Mercurial > vim
diff src/testdir/test_textprop.vim @ 29655:53e434838a85 v9.0.0168
patch 9.0.0168: cursor positioned wrong with two virtual text properties
Commit: https://github.com/vim/vim/commit/25463610dfc7a4984f70b030463fb98b09772ad9
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Aug 8 11:07:47 2022 +0100
patch 9.0.0168: cursor positioned wrong with two virtual text properties
Problem: Cursor positioned wrong with two virtual text properties close
together. (Ben Jackson)
Solution: Add the original size, not the computed one. (closes #10864)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 08 Aug 2022 12:15:06 +0200 |
parents | 9cd050914eb6 |
children | b90b037e80be |
line wrap: on
line diff
--- a/src/testdir/test_textprop.vim +++ b/src/testdir/test_textprop.vim @@ -2317,11 +2317,16 @@ func Test_prop_inserts_text() 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'}) + call setline(3, 'Foo foo = { 1, 2 };') + call prop_type_add( 'testprop', #{highlight: 'Comment'}) + call prop_add(3, 13, #{type: 'testprop', text: '.x='}) + call prop_add(3, 16, #{type: 'testprop', text: '.y='}) + + call setline(4, '') + call prop_add(4, 1, #{type: 'someprop', text: 'empty line'}) END call writefile(lines, 'XscriptPropsWithText') - let buf = RunVimInTerminal('-S XscriptPropsWithText', #{rows: 6, cols: 60}) + let buf = RunVimInTerminal('-S XscriptPropsWithText', #{rows: 8, cols: 60}) call VerifyScreenDump(buf, 'Test_prop_inserts_text_1', {}) call term_sendkeys(buf, ":set signcolumn=yes\<CR>") @@ -2330,8 +2335,13 @@ func Test_prop_inserts_text() call term_sendkeys(buf, "2G$") call VerifyScreenDump(buf, 'Test_prop_inserts_text_3', {}) - call term_sendkeys(buf, "3G") + call term_sendkeys(buf, "3Gf1") call VerifyScreenDump(buf, 'Test_prop_inserts_text_4', {}) + call term_sendkeys(buf, "f2") + call VerifyScreenDump(buf, 'Test_prop_inserts_text_5', {}) + + call term_sendkeys(buf, "4G") + call VerifyScreenDump(buf, 'Test_prop_inserts_text_6', {}) call StopVimInTerminal(buf) call delete('XscriptPropsWithText')