comparison 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
comparison
equal deleted inserted replaced
29604:be929fdde270 29605:0340a59e04ca
2219 normal $ 2219 normal $
2220 2220
2221 call setline(2, 'prepost') 2221 call setline(2, 'prepost')
2222 call prop_type_add('multibyte', #{highlight: 'Visual'}) 2222 call prop_type_add('multibyte', #{highlight: 'Visual'})
2223 call prop_add(2, 4, #{type: 'multibyte', text: 'söme和平téxt'}) 2223 call prop_add(2, 4, #{type: 'multibyte', text: 'söme和平téxt'})
2224
2225 call setline(3, '')
2226 call prop_add(3, 1, #{type: 'someprop', text: 'empty line'})
2224 END 2227 END
2225 call writefile(lines, 'XscriptPropsWithText') 2228 call writefile(lines, 'XscriptPropsWithText')
2226 let buf = RunVimInTerminal('-S XscriptPropsWithText', #{rows: 6, cols: 60}) 2229 let buf = RunVimInTerminal('-S XscriptPropsWithText', #{rows: 6, cols: 60})
2227 call VerifyScreenDump(buf, 'Test_prop_inserts_text_1', {}) 2230 call VerifyScreenDump(buf, 'Test_prop_inserts_text_1', {})
2228 2231
2229 call term_sendkeys(buf, ":set signcolumn=yes\<CR>") 2232 call term_sendkeys(buf, ":set signcolumn=yes\<CR>")
2230 call VerifyScreenDump(buf, 'Test_prop_inserts_text_2', {}) 2233 call VerifyScreenDump(buf, 'Test_prop_inserts_text_2', {})
2234
2235 call term_sendkeys(buf, "2G$")
2236 call VerifyScreenDump(buf, 'Test_prop_inserts_text_3', {})
2237
2238 call term_sendkeys(buf, "3G")
2239 call VerifyScreenDump(buf, 'Test_prop_inserts_text_4', {})
2231 2240
2232 call StopVimInTerminal(buf) 2241 call StopVimInTerminal(buf)
2233 call delete('XscriptPropsWithText') 2242 call delete('XscriptPropsWithText')
2234 endfunc 2243 endfunc
2235 2244