1
0
forked from aniani/vim

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 #10412,
            closes #7737, closes #5763)
This commit is contained in:
LemonBoy
2022-05-12 18:45:18 +01:00
committed by Bram Moolenaar
parent 39c46b4378
commit d0b1a09f44
3 changed files with 26 additions and 2 deletions

View File

@@ -534,6 +534,24 @@ func Test_prop_backspace()
set bs&
endfunc
func Test_prop_change()
new
let expected = SetupOneLine() " 'xonex xtwoxx'
" Characterwise.
exe "normal 7|c$\<Esc>"
call assert_equal('xonex ', getline(1))
call assert_equal(expected[:0], prop_list(1))
" Linewise.
exe "normal cc\<Esc>"
call assert_equal('', getline(1))
call assert_equal([], prop_list(1))
call DeletePropTypes()
bwipe!
set bs&
endfunc
func Test_prop_replace()
new
set bs=2