aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/highlight_spec.lua
diff options
context:
space:
mode:
authorZach Wegner <zwegner@gmail.com>2019-09-15 14:16:44 -0500
committerJustin M. Keyes <justinkz@gmail.com>2019-09-21 22:09:52 -0700
commit18e5869f56aab8a52d84185e5bd043799c36ae2d (patch)
tree9a9e3da150519344719ef555651488c3792cb73a /test/functional/ui/highlight_spec.lua
parent45447e3b647259d78434798ddd9c2ae245dcdbcc (diff)
downloadrneovim-18e5869f56aab8a52d84185e5bd043799c36ae2d.tar.gz
rneovim-18e5869f56aab8a52d84185e5bd043799c36ae2d.tar.bz2
rneovim-18e5869f56aab8a52d84185e5bd043799c36ae2d.zip
Fix "precedes" listchar behavior in wrap mode
Previously, the "precedes" character would be rendered on every row when w_skipcol > 0 (i.e., when viewing a single line longer than the entire screen), instead of just on the first row. Make sure to only render it on the first row in this case. Add a test for this behavior. Fix documentation for the "precedes" character, which erroneously stated that it was only active when wrap mode was off.
Diffstat (limited to 'test/functional/ui/highlight_spec.lua')
-rw-r--r--test/functional/ui/highlight_spec.lua24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/functional/ui/highlight_spec.lua b/test/functional/ui/highlight_spec.lua
index f40f658275..95a19aec81 100644
--- a/test/functional/ui/highlight_spec.lua
+++ b/test/functional/ui/highlight_spec.lua
@@ -657,6 +657,30 @@ describe("'listchars' highlight", function()
]])
end)
+ it("'listchar' with wrap", function()
+ screen:set_default_attr_ids({
+ [0] = {bold=true, foreground=Screen.colors.Blue},
+ })
+ feed_command('set wrap')
+ feed_command('set listchars=eol:¬,precedes:< list')
+ feed('90ia<esc>')
+ screen:expect([[
+ {0:<}aaaaaaaaaaaaaaaaaaa|
+ aaaaaaaaaaaaaaaaaaaa|
+ aaaaaaaaaaaaaaaaaaaa|
+ aaaaaaaaa^a{0:¬} |
+ |
+ ]])
+ feed('0')
+ screen:expect([[
+ ^aaaaaaaaaaaaaaaaaaaa|
+ aaaaaaaaaaaaaaaaaaaa|
+ aaaaaaaaaaaaaaaaaaaa|
+ aaaaaaaaaaaaaaaaaaaa|
+ |
+ ]])
+ end)
+
it("'listchar' in visual mode", function()
screen:set_default_attr_ids({
[1] = {background=Screen.colors.Grey90},