diff 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
line wrap: on
line diff
--- a/src/testdir/test_textprop.vim
+++ b/src/testdir/test_textprop.vim
@@ -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