mirror of
https://github.com/neovim/neovim.git
synced 2026-07-22 00:51:33 +00:00
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.
This commit is contained in:
committed by
Justin M. Keyes
parent
45447e3b64
commit
18e5869f56
@@ -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},
|
||||
|
||||
Reference in New Issue
Block a user