aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_listlbr.vim
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-07-29 02:11:31 +0200
committerckelsel <ckelsel@hotmail.com>2017-08-14 07:45:49 +0800
commita7b98246b3385d3cacfe5c0691c83f7558c2143e (patch)
treeed4da53de33a0da49b1093fe775abd08b70e141c /src/nvim/testdir/test_listlbr.vim
parentf5e55e93aa4b390e455d825a076cc0c29ba0e933 (diff)
downloadrneovim-a7b98246b3385d3cacfe5c0691c83f7558c2143e.tar.gz
rneovim-a7b98246b3385d3cacfe5c0691c83f7558c2143e.tar.bz2
rneovim-a7b98246b3385d3cacfe5c0691c83f7558c2143e.zip
vim-patch:8.0.0290 vim-patch:8.0.0394
vim-patch:8.0.0290: cursor positioning wrong if wide character wraps Problem: If a wide character doesn't fit at the end of the screen line, and the line doesn't fit on the screen, then the cursor position may be wrong. (anliting) Solution: Don't skip over wide character. (Christian Brabandt, closes vim/1408) vim-patch:8.0.0394 Problem: Tabs are not aligned when scrolling horizontally and a Tab doesn't fit. (Axel Bender) Solution: Handle a Tab as a not fitting character. (Christian Brabandt) Also fix that ":redraw" does not scroll horizontally to show the cursor. And fix the test that depended on the old behavior. https://github.com/vim/vim/commit/abc39ab642791ae3d22a524516eeedb673a95d9d
Diffstat (limited to 'src/nvim/testdir/test_listlbr.vim')
-rw-r--r--src/nvim/testdir/test_listlbr.vim16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_listlbr.vim b/src/nvim/testdir/test_listlbr.vim
index 71366a161e..7856ee82ab 100644
--- a/src/nvim/testdir/test_listlbr.vim
+++ b/src/nvim/testdir/test_listlbr.vim
@@ -217,3 +217,19 @@ func Test_list_with_listchars()
call s:compare_lines(expect, lines)
call s:close_windows()
endfunc
+
+func Test_list_with_tab_and_skipping_first_chars()
+ call s:test_windows('setl list listchars=tab:>- ts=70 nowrap')
+ call setline(1, ["iiiiiiiiiiiiiiii\taaaaaaaaaaaaaaaaaa", "iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii\taaaaaaaaaaaaaaaaaa", "iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii\taaaaaaaaaaaaaaaaaa", "iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii\taaaaaaaaaaaaaaaaaa"])
+ call cursor(4,64)
+ norm! 2zl
+ let lines = s:screen_lines([1, 4], winwidth(0))
+ let expect = [
+\ "---------------aaaaa",
+\ "---------------aaaaa",
+\ "---------------aaaaa",
+\ "iiiiiiiii>-----aaaaa",
+\ ]
+ call s:compare_lines(expect, lines)
+ call s:close_windows()
+endfu