Mercurial > vim
comparison src/testdir/test_textprop.vim @ 15341:03a7a9fdb792 v8.1.0678
patch 8.1.0678: text properties as not adjusted for inserted text
commit https://github.com/vim/vim/commit/44746aa1eb506ebe6e8fc71f6e549a0dcb754526
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jan 2 00:02:11 2019 +0100
patch 8.1.0678: text properties as not adjusted for inserted text
Problem: Text properties as not adjusted for inserted text.
Solution: Adjust text properties when inserting text.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 02 Jan 2019 00:15:05 +0100 |
parents | 18c20ceee4b5 |
children | f6b522596993 |
comparison
equal
deleted
inserted
replaced
15340:90d037c7fa06 | 15341:03a7a9fdb792 |
---|---|
298 funct Test_textprop_screenshots() | 298 funct Test_textprop_screenshots() |
299 if !CanRunVimInTerminal() || &encoding != 'utf-8' | 299 if !CanRunVimInTerminal() || &encoding != 'utf-8' |
300 return | 300 return |
301 endif | 301 endif |
302 call writefile([ | 302 call writefile([ |
303 \ "call setline(1, ['One two', 'Numbér 123 änd thœn 4¾7.', 'Three'])", | 303 \ "call setline(1, ['One two', 'Numbér 123 änd thœn 4¾7.', '--aa--bb--cc--dd--'])", |
304 \ "hi NumberProp ctermfg=blue", | 304 \ "hi NumberProp ctermfg=blue", |
305 \ "hi LongProp ctermbg=yellow", | 305 \ "hi LongProp ctermbg=yellow", |
306 \ "call prop_type_add('number', {'highlight': 'NumberProp'})", | 306 \ "call prop_type_add('number', {'highlight': 'NumberProp'})", |
307 \ "call prop_type_add('long', {'highlight': 'LongProp'})", | 307 \ "call prop_type_add('long', {'highlight': 'LongProp'})", |
308 \ "call prop_type_add('start', {'highlight': 'NumberProp', 'start_incl': 1})", | |
309 \ "call prop_type_add('end', {'highlight': 'NumberProp', 'end_incl': 1})", | |
310 \ "call prop_type_add('both', {'highlight': 'NumberProp', 'start_incl': 1, 'end_incl': 1})", | |
308 \ "call prop_add(1, 4, {'end_lnum': 3, 'end_col': 3, 'type': 'long'})", | 311 \ "call prop_add(1, 4, {'end_lnum': 3, 'end_col': 3, 'type': 'long'})", |
309 \ "call prop_add(2, 9, {'length': 3, 'type': 'number'})", | 312 \ "call prop_add(2, 9, {'length': 3, 'type': 'number'})", |
310 \ "call prop_add(2, 24, {'length': 4, 'type': 'number'})", | 313 \ "call prop_add(2, 24, {'length': 4, 'type': 'number'})", |
314 \ "call prop_add(3, 3, {'length': 2, 'type': 'number'})", | |
315 \ "call prop_add(3, 7, {'length': 2, 'type': 'start'})", | |
316 \ "call prop_add(3, 11, {'length': 2, 'type': 'end'})", | |
317 \ "call prop_add(3, 15, {'length': 2, 'type': 'both'})", | |
311 \ "set number", | 318 \ "set number", |
312 \ "hi clear SpellBad", | 319 \ "hi clear SpellBad", |
313 \ "set spell", | 320 \ "set spell", |
321 \ "normal 3G0llix\<Esc>lllix\<Esc>lllix\<Esc>lllix\<Esc>lllix\<Esc>lllix\<Esc>lllix\<Esc>lllix\<Esc>", | |
314 \], 'XtestProp') | 322 \], 'XtestProp') |
315 let buf = RunVimInTerminal('-S XtestProp', {'rows': 6}) | 323 let buf = RunVimInTerminal('-S XtestProp', {'rows': 6}) |
316 call VerifyScreenDump(buf, 'Test_textprop_01', {}) | 324 call VerifyScreenDump(buf, 'Test_textprop_01', {}) |
317 | 325 |
318 " clean up | 326 " clean up |