diff src/testdir/test_listener.vim @ 19534:36ec10251b2b v8.2.0324

patch 8.2.0324: text property not updated correctly when inserting/deleting Commit: https://github.com/vim/vim/commit/12f20038714928bfecdeee31ed1f927324542034 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Feb 26 22:06:00 2020 +0100 patch 8.2.0324: text property not updated correctly when inserting/deleting Problem: Text property not updated correctly when inserting/deleting. Solution: Use the right column when deleting. Make zero-width text properties respect start_incl and end_incl. (Axel Forsman, closes #5696, closes #5679)
author Bram Moolenaar <Bram@vim.org>
date Wed, 26 Feb 2020 22:15:04 +0100
parents af795b6a2624
children f3162c3ed128
line wrap: on
line diff
--- a/src/testdir/test_listener.vim
+++ b/src/testdir/test_listener.vim
@@ -326,3 +326,16 @@ func Test_listener_cleared_newbuf()
   bwipe!
   delfunc Listener
 endfunc
+
+func Test_col_after_deletion_moved_cur()
+	func Listener(bufnr, start, end, added, changes)
+    call assert_equal([#{lnum: 1, end: 2, added: 0, col: 2}], a:changes)
+	endfunc
+	new
+	call setline(1, ['foo'])
+	let lid = listener_add('Listener')
+	call feedkeys("lD", 'xt')
+  call listener_flush()
+	bwipe!
+	delfunc Listener
+endfunc