aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/syntax_conceal_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/ui/syntax_conceal_spec.lua')
-rw-r--r--test/functional/ui/syntax_conceal_spec.lua34
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()