comparison src/testdir/test_textprop.vim @ 16698:23af483c4ceb v8.1.1351

patch 8.1.1351: text property wrong after :substitute commit https://github.com/vim/vim/commit/338dfdad3844ebb1ce1d56c421d1f698c086eb0c Author: Bram Moolenaar <Bram@vim.org> Date: Sun May 19 15:19:57 2019 +0200 patch 8.1.1351: text property wrong after :substitute Problem: Text property wrong after :substitute. Solution: Save for undo before changing any text properties.
author Bram Moolenaar <Bram@vim.org>
date Sun, 19 May 2019 15:30:07 +0200
parents 7847d281cbbf
children ba592f30c082
comparison
equal deleted inserted replaced
16697:8356f693c812 16698:23af483c4ceb
604 set ul& 604 set ul&
605 let expected[0].length = 1 605 let expected[0].length = 1
606 call assert_equal(expected, prop_list(1)) 606 call assert_equal(expected, prop_list(1))
607 normal U 607 normal U
608 let expected[0].length = 2 608 let expected[0].length = 2
609 call assert_equal(expected, prop_list(1))
610
611 " substitute a word, then undo
612 call setline(1, 'the number 123 is highlighted.')
613 call prop_add(1, 12, {'length': 3, 'type': 'comment'})
614 let expected = [{'col': 12, 'length': 3, 'id': 0, 'type': 'comment', 'start': 1, 'end': 1} ]
615 call assert_equal(expected, prop_list(1))
616 set ul&
617 1s/number/foo
618 let expected[0].col = 9
619 call assert_equal(expected, prop_list(1))
620 undo
621 let expected[0].col = 12
609 call assert_equal(expected, prop_list(1)) 622 call assert_equal(expected, prop_list(1))
610 623
611 bwipe! 624 bwipe!
612 call prop_type_delete('comment') 625 call prop_type_delete('comment')
613 endfunc 626 endfunc