diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-04-01 20:37:45 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-01 20:37:45 +0800 |
commit | fce0d54eb2bcfff6903649ab093603dcd8f21f23 (patch) | |
tree | 2367f938b1e7efea4850f4dea8dbb4ca6ef6192e /test/functional/ui/syntax_conceal_spec.lua | |
parent | 377e87521157947c384d470a63927719b8c73ad7 (diff) | |
parent | ef595e9b93c3841511d8511e11b001e4162a2998 (diff) | |
download | rneovim-fce0d54eb2bcfff6903649ab093603dcd8f21f23.tar.gz rneovim-fce0d54eb2bcfff6903649ab093603dcd8f21f23.tar.bz2 rneovim-fce0d54eb2bcfff6903649ab093603dcd8f21f23.zip |
Merge pull request #17953 from zeertzjq/vim-8.2.4660
vim-patch:8.2.4660: cursorcolumn is sometimes not correct
Diffstat (limited to 'test/functional/ui/syntax_conceal_spec.lua')
-rw-r--r-- | test/functional/ui/syntax_conceal_spec.lua | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/functional/ui/syntax_conceal_spec.lua b/test/functional/ui/syntax_conceal_spec.lua index 92e5a5dd94..9d10c55cb6 100644 --- a/test/functional/ui/syntax_conceal_spec.lua +++ b/test/functional/ui/syntax_conceal_spec.lua @@ -256,6 +256,40 @@ describe('Screen', function() ]]) end) end) -- a region of text (implicit concealing) + + it("cursor position is correct when entering Insert mode with cocu=ni #13916", function() + insert([[foobarfoobarfoobar]]) + -- move to end of line + feed("$") + command("set concealcursor=ni") + command("syn match Foo /foobar/ conceal cchar=&") + screen:expect([[ + {1:&&&}^ | + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + | + ]]) + feed("i") + -- cursor should stay in place, not jump to column 16 + screen:expect([[ + {1:&&&}^ | + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {4:-- INSERT --} | + ]]) + end) end) -- match and conceal describe("let the conceal level be", function() |