Mercurial > vim
diff src/testdir/test_textprop.vim @ 16545:7a563ee902b6 v8.1.1276
patch 8.1.1276: cannot combine text properties with syntax highlighting
commit https://github.com/vim/vim/commit/de24a8701328b1cce7cad0ee11b415369b482420
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun May 5 15:48:00 2019 +0200
patch 8.1.1276: cannot combine text properties with syntax highlighting
Problem: Cannot combine text properties with syntax highlighting.
Solution: Add the "combine" field to prop_type_add(). (closes https://github.com/vim/vim/issues/4343)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 05 May 2019 16:00:05 +0200 |
parents | 176872829dc2 |
children | 1fc9cd08cf3c |
line wrap: on
line diff
--- a/src/testdir/test_textprop.vim +++ b/src/testdir/test_textprop.vim @@ -559,14 +559,23 @@ funct Test_textprop_screenshots() return endif call writefile([ - \ "call setline(1, ['One two', 'Numbér 123 änd thœn 4¾7.', '--aa--bb--cc--dd--'])", + \ "call setline(1, [" + \ .. "'One two'," + \ .. "'Numbér 123 änd thœn 4¾7.'," + \ .. "'--aa--bb--cc--dd--'," + \ .. "'// comment with error in it'," + \ .. "])", \ "hi NumberProp ctermfg=blue", \ "hi LongProp ctermbg=yellow", + \ "hi BackgroundProp ctermbg=lightgrey", + \ "hi UnderlineProp cterm=underline", \ "call prop_type_add('number', {'highlight': 'NumberProp'})", \ "call prop_type_add('long', {'highlight': 'LongProp'})", \ "call prop_type_add('start', {'highlight': 'NumberProp', 'start_incl': 1})", \ "call prop_type_add('end', {'highlight': 'NumberProp', 'end_incl': 1})", \ "call prop_type_add('both', {'highlight': 'NumberProp', 'start_incl': 1, 'end_incl': 1})", + \ "call prop_type_add('background', {'highlight': 'BackgroundProp', 'combine': 1})", + \ "call prop_type_add('error', {'highlight': 'UnderlineProp', 'combine': 1})", \ "call prop_add(1, 4, {'end_lnum': 3, 'end_col': 3, 'type': 'long'})", \ "call prop_add(2, 9, {'length': 3, 'type': 'number'})", \ "call prop_add(2, 24, {'length': 4, 'type': 'number'})", @@ -574,13 +583,17 @@ funct Test_textprop_screenshots() \ "call prop_add(3, 7, {'length': 2, 'type': 'start'})", \ "call prop_add(3, 11, {'length': 2, 'type': 'end'})", \ "call prop_add(3, 15, {'length': 2, 'type': 'both'})", + \ "call prop_add(4, 12, {'length': 10, 'type': 'background'})", + \ "call prop_add(4, 17, {'length': 5, 'type': 'error'})", \ "set number", \ "hi clear SpellBad", \ "set spell", + \ "syn match Comment '//.*'", + \ "hi Comment ctermfg=green", \ "normal 3G0llix\<Esc>lllix\<Esc>lllix\<Esc>lllix\<Esc>lllix\<Esc>lllix\<Esc>lllix\<Esc>lllix\<Esc>", \ "normal 3G0lli\<BS>\<Esc>", \], 'XtestProp') - let buf = RunVimInTerminal('-S XtestProp', {'rows': 6}) + let buf = RunVimInTerminal('-S XtestProp', {'rows': 7}) call VerifyScreenDump(buf, 'Test_textprop_01', {}) " clean up