mirror of
https://github.com/neovim/neovim.git
synced 2025-10-22 17:11:49 +00:00
test: add a test for #13916
This commit is contained in:
@@ -256,6 +256,40 @@ describe('Screen', function()
|
|||||||
]])
|
]])
|
||||||
end)
|
end)
|
||||||
end) -- a region of text (implicit concealing)
|
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
|
end) -- match and conceal
|
||||||
|
|
||||||
describe("let the conceal level be", function()
|
describe("let the conceal level be", function()
|
||||||
|
Reference in New Issue
Block a user