mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Add tests for highlighting after the end of a line.
This commit is contained in:
parent
6c3b0fb831
commit
2694fa759f
@ -93,6 +93,59 @@ describe('search highlighting', function()
|
|||||||
]])
|
]])
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
it('highlights after EOL', function()
|
||||||
|
insert("\n\n\n\n\n\n")
|
||||||
|
|
||||||
|
feed("gg/^<cr>")
|
||||||
|
screen:expect([[
|
||||||
|
{2: } |
|
||||||
|
{2:^ } |
|
||||||
|
{2: } |
|
||||||
|
{2: } |
|
||||||
|
{2: } |
|
||||||
|
{2: } |
|
||||||
|
/^ |
|
||||||
|
]])
|
||||||
|
|
||||||
|
-- Test that highlights are preserved after moving the cursor.
|
||||||
|
feed("j")
|
||||||
|
screen:expect([[
|
||||||
|
{2: } |
|
||||||
|
{2: } |
|
||||||
|
{2:^ } |
|
||||||
|
{2: } |
|
||||||
|
{2: } |
|
||||||
|
{2: } |
|
||||||
|
/^ |
|
||||||
|
]])
|
||||||
|
|
||||||
|
-- Repeat the test in rightleft mode.
|
||||||
|
feed_command("nohlsearch")
|
||||||
|
feed_command("set rightleft")
|
||||||
|
feed("gg/^<cr>")
|
||||||
|
|
||||||
|
screen:expect([[
|
||||||
|
{2: }|
|
||||||
|
{2:^ }|
|
||||||
|
{2: }|
|
||||||
|
{2: }|
|
||||||
|
{2: }|
|
||||||
|
{2: }|
|
||||||
|
^/ |
|
||||||
|
]])
|
||||||
|
|
||||||
|
feed("j")
|
||||||
|
screen:expect([[
|
||||||
|
{2: }|
|
||||||
|
{2: }|
|
||||||
|
{2:^ }|
|
||||||
|
{2: }|
|
||||||
|
{2: }|
|
||||||
|
{2: }|
|
||||||
|
^/ |
|
||||||
|
]])
|
||||||
|
end)
|
||||||
|
|
||||||
it('is preserved during :terminal activity', function()
|
it('is preserved during :terminal activity', function()
|
||||||
if iswin() then
|
if iswin() then
|
||||||
feed([[:terminal for /L \%I in (1,1,5000) do @(echo xxx & echo xxx & echo xxx)<cr>]])
|
feed([[:terminal for /L \%I in (1,1,5000) do @(echo xxx & echo xxx & echo xxx)<cr>]])
|
||||||
|
Loading…
Reference in New Issue
Block a user