forked from aniani/vim
patch 9.1.0753: Wrong display when typing in diff mode with 'smoothscroll'
Problem: Wrong display when typing in diff mode with 'smoothscroll'. Solution: Use adjust_plines_for_skipcol() (zeertzjq). closes: #15776 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
25732435c5
commit
47f8584a80
@@ -302,6 +302,36 @@ func Test_smoothscroll_diff_mode()
|
||||
call StopVimInTerminal(buf)
|
||||
endfunc
|
||||
|
||||
func Test_smoothscroll_diff_change_line()
|
||||
CheckScreendump
|
||||
|
||||
let lines =<< trim END
|
||||
set diffopt+=followwrap smoothscroll
|
||||
call setline(1, repeat(' abc', &columns))
|
||||
call setline(2, 'bar')
|
||||
call setline(3, repeat(' abc', &columns))
|
||||
vnew
|
||||
call setline(1, repeat(' abc', &columns))
|
||||
call setline(2, 'foo')
|
||||
call setline(3, 'bar')
|
||||
call setline(4, repeat(' abc', &columns))
|
||||
windo exe "normal! 2gg5\<C-E>"
|
||||
windo diffthis
|
||||
END
|
||||
call writefile(lines, 'XSmoothDiffChangeLine', 'D')
|
||||
let buf = RunVimInTerminal('-S XSmoothDiffChangeLine', #{rows: 20, columns: 55})
|
||||
|
||||
call VerifyScreenDump(buf, 'Test_smooth_diff_change_line_1', {})
|
||||
call term_sendkeys(buf, "Abar")
|
||||
call VerifyScreenDump(buf, 'Test_smooth_diff_change_line_2', {})
|
||||
call term_sendkeys(buf, "\<Esc>")
|
||||
call VerifyScreenDump(buf, 'Test_smooth_diff_change_line_3', {})
|
||||
call term_sendkeys(buf, "yyp")
|
||||
call VerifyScreenDump(buf, 'Test_smooth_diff_change_line_4', {})
|
||||
|
||||
call StopVimInTerminal(buf)
|
||||
endfunc
|
||||
|
||||
func Test_smoothscroll_wrap_scrolloff_zero()
|
||||
CheckScreendump
|
||||
|
||||
|
||||
Reference in New Issue
Block a user