Mercurial > vim
diff src/testdir/test_listlbr_utf8.vim @ 11010:c004e17fa36b v8.0.0394
patch 8.0.0394: tabs are not aligned when scrolling horizontally
commit https://github.com/vim/vim/commit/abc39ab642791ae3d22a524516eeedb673a95d9d
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Mar 1 18:04:05 2017 +0100
patch 8.0.0394: tabs are not aligned when scrolling horizontally
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.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 01 Mar 2017 18:15:04 +0100 |
parents | 5e20c9f96cd5 |
children | 18373179040e |
line wrap: on
line diff
--- a/src/testdir/test_listlbr_utf8.vim +++ b/src/testdir/test_listlbr_utf8.vim @@ -220,3 +220,37 @@ func Test_multibyte_wrap_and_breakat() call s:compare_lines(expect, lines) call s:close_windows('setl brk&vim') endfunc + +func Test_chinese_char_on_wrap_column() + call s:test_windows("setl nolbr wrap sbr=") + syntax off + call setline(1, [ +\ 'aaaaaaaaaaaaaaaaaaa中'. +\ 'aaaaaaaaaaaaaaaaa中'. +\ 'aaaaaaaaaaaaaaaaa中'. +\ 'aaaaaaaaaaaaaaaaa中'. +\ 'aaaaaaaaaaaaaaaaa中'. +\ 'aaaaaaaaaaaaaaaaa中'. +\ 'aaaaaaaaaaaaaaaaa中'. +\ 'aaaaaaaaaaaaaaaaa中'. +\ 'aaaaaaaaaaaaaaaaa中'. +\ 'aaaaaaaaaaaaaaaaa中'. +\ 'hello']) + call cursor(1,1) + norm! $ + redraw! + let expect=[ +\ '中aaaaaaaaaaaaaaaaa>', +\ '中aaaaaaaaaaaaaaaaa>', +\ '中aaaaaaaaaaaaaaaaa>', +\ '中aaaaaaaaaaaaaaaaa>', +\ '中aaaaaaaaaaaaaaaaa>', +\ '中aaaaaaaaaaaaaaaaa>', +\ '中aaaaaaaaaaaaaaaaa>', +\ '中aaaaaaaaaaaaaaaaa>', +\ '中aaaaaaaaaaaaaaaaa>', +\ '中hello '] + let lines = s:screen_lines([1, 10], winwidth(0)) + call s:compare_lines(expect, lines) + call s:close_windows() +endfu