comparison src/testdir/test_textprop.vim @ 28841:77a00aa3e215 v8.2.4944

patch 8.2.4944: text properties are wrong after "cc" Commit: https://github.com/vim/vim/commit/d0b1a09f44654bb5e29b09de1311845200f17d90 Author: LemonBoy <thatlemon@gmail.com> Date: Thu May 12 18:45:18 2022 +0100 patch 8.2.4944: text properties are wrong after "cc" Problem: Text properties are wrong after "cc". (Axel Forsman) Solution: Pass the deleted byte count to inserted_bytes(). (closes https://github.com/vim/vim/issues/10412, closes #7737, closes #5763)
author Bram Moolenaar <Bram@vim.org>
date Thu, 12 May 2022 20:00:02 +0200
parents 171f9def0398
children ba81f4ed59e2
comparison
equal deleted inserted replaced
28840:4318ef970867 28841:77a00aa3e215
526 exe "normal 0li\<BS>\<Esc>fxli\<BS>\<Esc>" 526 exe "normal 0li\<BS>\<Esc>fxli\<BS>\<Esc>"
527 call assert_equal('one xtwoxx', getline(1)) 527 call assert_equal('one xtwoxx', getline(1))
528 let expected[0].col = 1 528 let expected[0].col = 1
529 let expected[1].col = 6 529 let expected[1].col = 6
530 call assert_equal(expected, prop_list(1)) 530 call assert_equal(expected, prop_list(1))
531
532 call DeletePropTypes()
533 bwipe!
534 set bs&
535 endfunc
536
537 func Test_prop_change()
538 new
539 let expected = SetupOneLine() " 'xonex xtwoxx'
540
541 " Characterwise.
542 exe "normal 7|c$\<Esc>"
543 call assert_equal('xonex ', getline(1))
544 call assert_equal(expected[:0], prop_list(1))
545 " Linewise.
546 exe "normal cc\<Esc>"
547 call assert_equal('', getline(1))
548 call assert_equal([], prop_list(1))
531 549
532 call DeletePropTypes() 550 call DeletePropTypes()
533 bwipe! 551 bwipe!
534 set bs& 552 set bs&
535 endfunc 553 endfunc