mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Fix redraw regression with w_p_cole in visual mode
Fixes https://github.com/neovim/neovim/issues/11024, regressed in 23c71d51
.
Closes https://github.com/neovim/neovim/pull/11120.
This commit is contained in:
parent
30ae60e7ca
commit
b7d6caaa03
@ -578,10 +578,13 @@ void conceal_check_cursor_line(void)
|
|||||||
///
|
///
|
||||||
/// If true, both old and new cursorline will need
|
/// If true, both old and new cursorline will need
|
||||||
/// need to be redrawn when moving cursor within windows.
|
/// need to be redrawn when moving cursor within windows.
|
||||||
|
/// TODO(bfredl): VIsual_active shouldn't be needed, but is used to fix a glitch
|
||||||
|
/// caused by scrolling.
|
||||||
bool win_cursorline_standout(const win_T *wp)
|
bool win_cursorline_standout(const win_T *wp)
|
||||||
FUNC_ATTR_NONNULL_ALL
|
FUNC_ATTR_NONNULL_ALL
|
||||||
{
|
{
|
||||||
return wp->w_p_cul || (wp->w_p_cole > 0 && !conceal_cursor_line(wp));
|
return wp->w_p_cul
|
||||||
|
|| (wp->w_p_cole > 0 && (VIsual_active || !conceal_cursor_line(wp)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -17,6 +17,7 @@ describe('Screen', function()
|
|||||||
[3] = {reverse = true},
|
[3] = {reverse = true},
|
||||||
[4] = {bold = true},
|
[4] = {bold = true},
|
||||||
[5] = {background = Screen.colors.Yellow},
|
[5] = {background = Screen.colors.Yellow},
|
||||||
|
[6] = {background = Screen.colors.LightGrey},
|
||||||
} )
|
} )
|
||||||
end)
|
end)
|
||||||
|
|
||||||
@ -823,5 +824,50 @@ describe('Screen', function()
|
|||||||
]])
|
]])
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
it('redraws properly with concealcursor in visual mode', function()
|
||||||
|
command('set concealcursor=v conceallevel=2')
|
||||||
|
|
||||||
|
feed('10Ofoo barf bar barf eggs<esc>')
|
||||||
|
feed(':3<cr>o a<Esc>ggV')
|
||||||
|
screen:expect{grid=[[
|
||||||
|
^f{6:oo }{1:b}{6: bar }{1:b}{6: eggs} |
|
||||||
|
foo {1:b} bar {1:b} eggs |
|
||||||
|
foo {1:b} bar {1:b} eggs |
|
||||||
|
a |
|
||||||
|
foo {1:b} bar {1:b} eggs |
|
||||||
|
foo {1:b} bar {1:b} eggs |
|
||||||
|
foo {1:b} bar {1:b} eggs |
|
||||||
|
foo {1:b} bar {1:b} eggs |
|
||||||
|
foo {1:b} bar {1:b} eggs |
|
||||||
|
{4:-- VISUAL LINE --} |
|
||||||
|
]]}
|
||||||
|
feed(string.rep('j', 15))
|
||||||
|
screen:expect{grid=[[
|
||||||
|
{6:foo }{1:b}{6: bar }{1:b}{6: eggs} |
|
||||||
|
{6:foo }{1:b}{6: bar }{1:b}{6: eggs} |
|
||||||
|
{6:foo }{1:b}{6: bar }{1:b}{6: eggs} |
|
||||||
|
{6:foo }{1:b}{6: bar }{1:b}{6: eggs} |
|
||||||
|
{6:foo }{1:b}{6: bar }{1:b}{6: eggs} |
|
||||||
|
{6:foo }{1:b}{6: bar }{1:b}{6: eggs} |
|
||||||
|
{6:foo }{1:b}{6: bar }{1:b}{6: eggs} |
|
||||||
|
{6:foo }{1:b}{6: bar }{1:b}{6: eggs} |
|
||||||
|
^f{6:oo }{1:b}{6: bar }{1:b}{6: eggs} |
|
||||||
|
{4:-- VISUAL LINE --} |
|
||||||
|
]]}
|
||||||
|
feed(string.rep('k', 15))
|
||||||
|
screen:expect{grid=[[
|
||||||
|
^f{6:oo }{1:b}{6: bar }{1:b}{6: eggs} |
|
||||||
|
foo {1:b} bar {1:b} eggs |
|
||||||
|
foo {1:b} bar {1:b} eggs |
|
||||||
|
a |
|
||||||
|
foo {1:b} bar {1:b} eggs |
|
||||||
|
foo {1:b} bar {1:b} eggs |
|
||||||
|
foo {1:b} bar {1:b} eggs |
|
||||||
|
foo {1:b} bar {1:b} eggs |
|
||||||
|
foo {1:b} bar {1:b} eggs |
|
||||||
|
{4:-- VISUAL LINE --} |
|
||||||
|
]]}
|
||||||
|
end)
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
Loading…
Reference in New Issue
Block a user