mirror of
https://github.com/neovim/neovim.git
synced 2025-09-13 06:48:17 +00:00
vim-patch:9.0.1759: Visual highlight not working with cursor at end of screen line
Problem: Visual highlight not working with cursor at end of screen line
and 'showbreak'.
Solution: Only update "vcol_prev" when drawing buffer text.
closes: vim/vim#12865
8fc6a1dae0
This commit is contained in:
@@ -9,6 +9,34 @@ local command = helpers.command
|
||||
describe('display', function()
|
||||
before_each(clear)
|
||||
|
||||
-- oldtest: Test_visual_block_scroll()
|
||||
it('redraws properly after scrolling with matchparen loaded and scrolloff=1', function()
|
||||
local screen = Screen.new(30, 7)
|
||||
screen:attach()
|
||||
screen:set_default_attr_ids({
|
||||
[1] = {bold = true},
|
||||
[2] = {background = Screen.colors.LightGrey},
|
||||
})
|
||||
|
||||
exec([[
|
||||
source $VIMRUNTIME/plugin/matchparen.vim
|
||||
set scrolloff=1
|
||||
call setline(1, ['a', 'b', 'c', 'd', 'e', '', '{', '}', '{', 'f', 'g', '}'])
|
||||
call cursor(5, 1)
|
||||
]])
|
||||
|
||||
feed('V<c-d><c-d>')
|
||||
screen:expect([[
|
||||
{2:{} |
|
||||
{2:}} |
|
||||
{2:{} |
|
||||
{2:f} |
|
||||
^g |
|
||||
} |
|
||||
{1:-- VISUAL LINE --} |
|
||||
]])
|
||||
end)
|
||||
|
||||
-- oldtest: Test_display_scroll_at_topline()
|
||||
it('scroll when modified at topline vim-patch:8.2.1488', function()
|
||||
local screen = Screen.new(20, 4)
|
||||
|
Reference in New Issue
Block a user