Mercurial > vim
diff src/testdir/test_breakindent.vim @ 18502:3ebb15e3c28d v8.1.2245
patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Commit: https://github.com/vim/vim/commit/2f7b7b1e123d505637d21e0df28eb9e92667479c
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Nov 3 15:46:48 2019 +0100
patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Problem: Third character of 'listchars' tab shows in wrong place when
'breakindent' is set.
Solution: Set c_final to NUL. (Naruhiko Nishino, closes #5165)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 03 Nov 2019 16:00:04 +0100 |
parents | 988e5a868b60 |
children | 8b0114ffde2b |
line wrap: on
line diff
--- a/src/testdir/test_breakindent.vim +++ b/src/testdir/test_breakindent.vim @@ -614,3 +614,44 @@ func Test_breakindent16_vartabs() call s:compare_lines(expect, lines) call s:close_windows('set vts&') endfunc + +func Test_breakindent17_vartabs() + if !has("vartabs") + return + endif + let s:input = "" + call s:test_windows('setl breakindent list listchars=tab:<-> showbreak=+++') + call setline(1, "\t" . repeat('a', 63)) + vert resize 30 + norm! 1gg$ + redraw! + let lines = s:screen_lines(1, 30) + let expect = [ + \ "<-->aaaaaaaaaaaaaaaaaaaaaaaaaa", + \ " +++aaaaaaaaaaaaaaaaaaaaaaa", + \ " +++aaaaaaaaaaaaaa ", + \ ] + call s:compare_lines(expect, lines) + call s:close_windows('set breakindent& list& listchars& showbreak&') +endfunc + +func Test_breakindent18_vartabs() + if !has("vartabs") + return + endif + let s:input = "" + call s:test_windows('setl breakindent list listchars=tab:<->') + call setline(1, "\t" . repeat('a', 63)) + vert resize 30 + norm! 1gg$ + redraw! + let lines = s:screen_lines(1, 30) + let expect = [ + \ "<-->aaaaaaaaaaaaaaaaaaaaaaaaaa", + \ " aaaaaaaaaaaaaaaaaaaaaaaaaa", + \ " aaaaaaaaaaa ", + \ ] + call s:compare_lines(expect, lines) + call s:close_windows('set breakindent& list& listchars&') +endfunc +