comparison src/testdir/test_listchars.vim @ 15502:bc17a9d37810 v8.1.0759

patch 8.1.0759: showing two characters for tab is limited commit https://github.com/vim/vim/commit/83a52171ba00b2b9fd2d1d22a07e38fc9fc69c1e Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jan 16 22:41:54 2019 +0100 patch 8.1.0759: showing two characters for tab is limited Problem: Showing two characters for tab is limited. Solution: Allow for a third character for "tab:" in 'listchars'. (Nathaniel Braun, Ken Takata, closes #3810)
author Bram Moolenaar <Bram@vim.org>
date Wed, 16 Jan 2019 22:45:07 +0100
parents 90aaa974594e
children 52930462eec4
comparison
equal deleted inserted replaced
15501:f1ba08812cf2 15502:bc17a9d37810
40 for i in range(1, 5) 40 for i in range(1, 5)
41 call cursor(i, 1) 41 call cursor(i, 1)
42 call assert_equal([expected[i - 1]], ScreenLines(i, virtcol('$'))) 42 call assert_equal([expected[i - 1]], ScreenLines(i, virtcol('$')))
43 endfor 43 endfor
44 44
45 " tab with 3rd character.
46 set listchars-=tab:>-
47 set listchars+=tab:<=>,trail:-
48 let expected = [
49 \ '<======>aa<====>$',
50 \ '..bb<==>--$',
51 \ '...cccc>-$',
52 \ 'dd........ee--<>$',
53 \ '-$'
54 \ ]
55 redraw!
56 for i in range(1, 5)
57 call cursor(i, 1)
58 call assert_equal([expected[i - 1]], ScreenLines(i, virtcol('$')))
59 endfor
60
61 set listchars-=trail:-
62 let expected = [
63 \ '<======>aa<====>$',
64 \ '..bb<==>..$',
65 \ '...cccc>.$',
66 \ 'dd........ee..<>$',
67 \ '.$'
68 \ ]
69 redraw!
70 for i in range(1, 5)
71 call cursor(i, 1)
72 call assert_equal([expected[i - 1]], ScreenLines(i, virtcol('$')))
73 endfor
74
75 set listchars-=tab:<=>
76 set listchars+=tab:>-
45 set listchars+=trail:< 77 set listchars+=trail:<
46 set nolist 78 set nolist
47 normal ggdG 79 normal ggdG
48 call append(0, [ 80 call append(0, [
49 \ ' fff ', 81 \ ' fff ',