mirror of
https://github.com/neovim/neovim.git
synced 2025-09-17 00:38:17 +00:00
vim-patch:9.0.1800: Cursor position still wrong with 'showbreak' and virtual text
Problem: Cursor position still wrong with 'showbreak' and virtual text
after last character or 'listchars' "eol".
Solution: Remove unnecessary w_wcol adjustment in curs_columns(). Also
fix first char of virtual text not shown at the start of a screen
line.
closes: vim/vim#12478
closes: vim/vim#12532
closes: vim/vim#12904
6a3897232a
This commit is contained in:
@@ -938,7 +938,6 @@ func Test_cursor_position_with_showbreak()
|
||||
vim9script
|
||||
&signcolumn = 'yes'
|
||||
&showbreak = '++'
|
||||
&breakindent = true
|
||||
&breakindentopt = 'shift:2'
|
||||
var leftcol: number = win_getid()->getwininfo()->get(0, {})->get('textoff')
|
||||
repeat('x', &columns - leftcol - 1)->setline(1)
|
||||
@@ -952,9 +951,14 @@ func Test_cursor_position_with_showbreak()
|
||||
" No line wraps, so changing 'showbreak' should lead to the same screen.
|
||||
call term_sendkeys(buf, "\<C-\>\<C-O>:setlocal showbreak=+\<CR>")
|
||||
call VerifyScreenDump(buf, 'Test_cursor_position_with_showbreak_1', {})
|
||||
" No line wraps, so setting 'breakindent' should lead to the same screen.
|
||||
call term_sendkeys(buf, "\<C-\>\<C-O>:setlocal breakindent\<CR>")
|
||||
call VerifyScreenDump(buf, 'Test_cursor_position_with_showbreak_1', {})
|
||||
" The first line now wraps because of "eol" in 'listchars'.
|
||||
call term_sendkeys(buf, "\<C-\>\<C-O>:setlocal list\<CR>")
|
||||
call VerifyScreenDump(buf, 'Test_cursor_position_with_showbreak_2', {})
|
||||
call term_sendkeys(buf, "\<C-\>\<C-O>:setlocal nobreakindent\<CR>")
|
||||
call VerifyScreenDump(buf, 'Test_cursor_position_with_showbreak_3', {})
|
||||
|
||||
call StopVimInTerminal(buf)
|
||||
endfunc
|
||||
|
Reference in New Issue
Block a user