aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_listlbr.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-10-09 18:48:32 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-10-09 18:58:30 +0800
commitc93fd83df206c2438a735d6d99e640db1976f2f0 (patch)
tree5351b62965463dcb6822bd86b80e3f1c8ec34c2a /src/nvim/testdir/test_listlbr.vim
parent603c6b6996eb7e04d50fe5544754669a06af73e0 (diff)
downloadrneovim-c93fd83df206c2438a735d6d99e640db1976f2f0.tar.gz
rneovim-c93fd83df206c2438a735d6d99e640db1976f2f0.tar.bz2
rneovim-c93fd83df206c2438a735d6d99e640db1976f2f0.zip
vim-patch:9.0.0697: cursor in wrong position with Visual substitute
Problem: Cursor in wrong position with Visual substitute. Solution: When restoring 'linebreak' mark the virtual column as invalid. (closes vim/vim#11309, closes vim/vim#11311) https://github.com/vim/vim/commit/16dab41537ae206f4cab676ad53edbae5fd5fb45 N/A patches for version.c: vim-patch:9.0.0699: tiny build fails Problem: Tiny build fails. Solution: Add #ifdef. https://github.com/vim/vim/commit/bf499c0e6f30a94fe062f83ea0190f93178d0d74
Diffstat (limited to 'src/nvim/testdir/test_listlbr.vim')
-rw-r--r--src/nvim/testdir/test_listlbr.vim21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_listlbr.vim b/src/nvim/testdir/test_listlbr.vim
index affa0f96fa..8598c0d963 100644
--- a/src/nvim/testdir/test_listlbr.vim
+++ b/src/nvim/testdir/test_listlbr.vim
@@ -7,6 +7,7 @@ CheckOption linebreak
CheckFeature conceal
source view_util.vim
+source screendump.vim
function s:screen_lines(lnum, width) abort
return ScreenLines(a:lnum, a:width)
@@ -133,6 +134,26 @@ func Test_linebreak_with_visual_operations()
call s:close_windows()
endfunc
+func Test_linebreak_reset_restore()
+ CheckScreendump
+
+ let lines =<< trim END
+ vim9script
+ &linebreak = true
+ &showcmd = true
+ &showmode = false
+ ('a'->repeat(&columns - 10) .. ' ' .. 'b'->repeat(10) .. ' c')->setline(1)
+ END
+ call writefile(lines, 'XlbrResetRestore', 'D')
+ let buf = RunVimInTerminal('-S XlbrResetRestore', {'rows': 8})
+
+ call term_sendkeys(buf, '$v$s')
+ call VerifyScreenDump(buf, 'Test_linebreak_reset_restore_1', {})
+
+ call term_sendkeys(buf, "\<Esc>")
+ call StopVimInTerminal(buf)
+endfunc
+
func Test_virtual_block()
call s:test_windows('setl sbr=+')
call setline(1, [