diff src/testdir/test_textprop.vim @ 29605:0340a59e04ca v9.0.0143

patch 9.0.0143: cursor positioned after virtual text in empty line Commit: https://github.com/vim/vim/commit/afd2aa79eda3fe69f2e7c87d0b9b4bca874f386a Author: Bram Moolenaar <Bram@vim.org> Date: Fri Aug 5 13:07:23 2022 +0100 patch 9.0.0143: cursor positioned after virtual text in empty line Problem: Cursor positioned after virtual text in empty line. Solution: Keep cursor in the first column. (closes https://github.com/vim/vim/issues/10786)
author Bram Moolenaar <Bram@vim.org>
date Fri, 05 Aug 2022 14:15:04 +0200
parents f2d7f20d83c3
children 33d7c1fa2dac
line wrap: on
line diff
--- a/src/testdir/test_textprop.vim
+++ b/src/testdir/test_textprop.vim
@@ -2221,6 +2221,9 @@ func Test_prop_inserts_text()
       call setline(2, 'prepost')
       call prop_type_add('multibyte', #{highlight: 'Visual'})
       call prop_add(2, 4, #{type: 'multibyte', text: 'söme和平téxt'})
+
+      call setline(3, '')
+      call prop_add(3, 1, #{type: 'someprop', text: 'empty line'})
   END
   call writefile(lines, 'XscriptPropsWithText')
   let buf = RunVimInTerminal('-S XscriptPropsWithText', #{rows: 6, cols: 60})
@@ -2229,6 +2232,12 @@ func Test_prop_inserts_text()
   call term_sendkeys(buf, ":set signcolumn=yes\<CR>")
   call VerifyScreenDump(buf, 'Test_prop_inserts_text_2', {})
 
+  call term_sendkeys(buf, "2G$")
+  call VerifyScreenDump(buf, 'Test_prop_inserts_text_3', {})
+
+  call term_sendkeys(buf, "3G")
+  call VerifyScreenDump(buf, 'Test_prop_inserts_text_4', {})
+
   call StopVimInTerminal(buf)
   call delete('XscriptPropsWithText')
 endfunc