diff options
author | Ricky Zhou <ricky@rzhou.org> | 2018-08-26 21:23:55 -0700 |
---|---|---|
committer | Ricky Zhou <ricky@rzhou.org> | 2018-09-03 03:13:03 -0700 |
commit | 2694fa759f72b9d923be5e2108110685a1583faf (patch) | |
tree | c5f3ef36f1791808f59b4dbfe12f8bd4d561b4e3 | |
parent | 6c3b0fb831da89aac679da69a0fd5df43c27af80 (diff) | |
download | rneovim-2694fa759f72b9d923be5e2108110685a1583faf.tar.gz rneovim-2694fa759f72b9d923be5e2108110685a1583faf.tar.bz2 rneovim-2694fa759f72b9d923be5e2108110685a1583faf.zip |
Add tests for highlighting after the end of a line.
-rw-r--r-- | test/functional/ui/searchhl_spec.lua | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/test/functional/ui/searchhl_spec.lua b/test/functional/ui/searchhl_spec.lua index 168080a092..87167553f3 100644 --- a/test/functional/ui/searchhl_spec.lua +++ b/test/functional/ui/searchhl_spec.lua @@ -93,6 +93,59 @@ describe('search highlighting', function() ]]) 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() if iswin() then feed([[:terminal for /L \%I in (1,1,5000) do @(echo xxx & echo xxx & echo xxx)<cr>]]) |