Mercurial > vim
annotate src/testdir/test_listchars.vim @ 16148:90b0f2227d73 v8.1.1079
patch 8.1.1079: no need for a separate ScreenLinesUtf8() test function
commit https://github.com/vim/vim/commit/48aed0824e47147faf19fc235ad4bcf851584c9c
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Mar 30 15:44:17 2019 +0100
patch 8.1.1079: no need for a separate ScreenLinesUtf8() test function
Problem: No need for a separate ScreenLinesUtf8() test function.
Solution: Get the composing characters with ScreenLines().
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 30 Mar 2019 15:45:05 +0100 |
parents | aaa6e9a43a60 |
children | 5fb0f15fafea |
rev | line source |
---|---|
12851
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 " Tests for 'listchars' display with 'list' and :list |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
3 source view_util.vim |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 func Test_listchars() |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 enew! |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 set ff=unix |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 set list |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
9 |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
10 set listchars+=tab:>-,space:.,trail:< |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
11 call append(0, [ |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
12 \ ' aa ', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
13 \ ' bb ', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
14 \ ' cccc ', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
15 \ 'dd ee ', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
16 \ ' ' |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
17 \ ]) |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
18 let expected = [ |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
19 \ '>-------aa>-----$', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
20 \ '..bb>---<<$', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
21 \ '...cccc><$', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
22 \ 'dd........ee<<>-$', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
23 \ '<$' |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
24 \ ] |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
25 redraw! |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
26 for i in range(1, 5) |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
27 call cursor(i, 1) |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
28 call assert_equal([expected[i - 1]], ScreenLines(i, virtcol('$'))) |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
29 endfor |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
30 |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
31 set listchars-=trail:< |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
32 let expected = [ |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
33 \ '>-------aa>-----$', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
34 \ '..bb>---..$', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
35 \ '...cccc>.$', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
36 \ 'dd........ee..>-$', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
37 \ '.$' |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
38 \ ] |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
39 redraw! |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
40 for i in range(1, 5) |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
41 call cursor(i, 1) |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
42 call assert_equal([expected[i - 1]], ScreenLines(i, virtcol('$'))) |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
43 endfor |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
44 |
15502
bc17a9d37810
patch 8.1.0759: showing two characters for tab is limited
Bram Moolenaar <Bram@vim.org>
parents:
12851
diff
changeset
|
45 " tab with 3rd character. |
bc17a9d37810
patch 8.1.0759: showing two characters for tab is limited
Bram Moolenaar <Bram@vim.org>
parents:
12851
diff
changeset
|
46 set listchars-=tab:>- |
bc17a9d37810
patch 8.1.0759: showing two characters for tab is limited
Bram Moolenaar <Bram@vim.org>
parents:
12851
diff
changeset
|
47 set listchars+=tab:<=>,trail:- |
bc17a9d37810
patch 8.1.0759: showing two characters for tab is limited
Bram Moolenaar <Bram@vim.org>
parents:
12851
diff
changeset
|
48 let expected = [ |
bc17a9d37810
patch 8.1.0759: showing two characters for tab is limited
Bram Moolenaar <Bram@vim.org>
parents:
12851
diff
changeset
|
49 \ '<======>aa<====>$', |
bc17a9d37810
patch 8.1.0759: showing two characters for tab is limited
Bram Moolenaar <Bram@vim.org>
parents:
12851
diff
changeset
|
50 \ '..bb<==>--$', |
bc17a9d37810
patch 8.1.0759: showing two characters for tab is limited
Bram Moolenaar <Bram@vim.org>
parents:
12851
diff
changeset
|
51 \ '...cccc>-$', |
bc17a9d37810
patch 8.1.0759: showing two characters for tab is limited
Bram Moolenaar <Bram@vim.org>
parents:
12851
diff
changeset
|
52 \ 'dd........ee--<>$', |
bc17a9d37810
patch 8.1.0759: showing two characters for tab is limited
Bram Moolenaar <Bram@vim.org>
parents:
12851
diff
changeset
|
53 \ '-$' |
bc17a9d37810
patch 8.1.0759: showing two characters for tab is limited
Bram Moolenaar <Bram@vim.org>
parents:
12851
diff
changeset
|
54 \ ] |
bc17a9d37810
patch 8.1.0759: showing two characters for tab is limited
Bram Moolenaar <Bram@vim.org>
parents:
12851
diff
changeset
|
55 redraw! |
bc17a9d37810
patch 8.1.0759: showing two characters for tab is limited
Bram Moolenaar <Bram@vim.org>
parents:
12851
diff
changeset
|
56 for i in range(1, 5) |
bc17a9d37810
patch 8.1.0759: showing two characters for tab is limited
Bram Moolenaar <Bram@vim.org>
parents:
12851
diff
changeset
|
57 call cursor(i, 1) |
bc17a9d37810
patch 8.1.0759: showing two characters for tab is limited
Bram Moolenaar <Bram@vim.org>
parents:
12851
diff
changeset
|
58 call assert_equal([expected[i - 1]], ScreenLines(i, virtcol('$'))) |
bc17a9d37810
patch 8.1.0759: showing two characters for tab is limited
Bram Moolenaar <Bram@vim.org>
parents:
12851
diff
changeset
|
59 endfor |
bc17a9d37810
patch 8.1.0759: showing two characters for tab is limited
Bram Moolenaar <Bram@vim.org>
parents:
12851
diff
changeset
|
60 |
bc17a9d37810
patch 8.1.0759: showing two characters for tab is limited
Bram Moolenaar <Bram@vim.org>
parents:
12851
diff
changeset
|
61 set listchars-=trail:- |
bc17a9d37810
patch 8.1.0759: showing two characters for tab is limited
Bram Moolenaar <Bram@vim.org>
parents:
12851
diff
changeset
|
62 let expected = [ |
bc17a9d37810
patch 8.1.0759: showing two characters for tab is limited
Bram Moolenaar <Bram@vim.org>
parents:
12851
diff
changeset
|
63 \ '<======>aa<====>$', |
bc17a9d37810
patch 8.1.0759: showing two characters for tab is limited
Bram Moolenaar <Bram@vim.org>
parents:
12851
diff
changeset
|
64 \ '..bb<==>..$', |
bc17a9d37810
patch 8.1.0759: showing two characters for tab is limited
Bram Moolenaar <Bram@vim.org>
parents:
12851
diff
changeset
|
65 \ '...cccc>.$', |
bc17a9d37810
patch 8.1.0759: showing two characters for tab is limited
Bram Moolenaar <Bram@vim.org>
parents:
12851
diff
changeset
|
66 \ 'dd........ee..<>$', |
bc17a9d37810
patch 8.1.0759: showing two characters for tab is limited
Bram Moolenaar <Bram@vim.org>
parents:
12851
diff
changeset
|
67 \ '.$' |
bc17a9d37810
patch 8.1.0759: showing two characters for tab is limited
Bram Moolenaar <Bram@vim.org>
parents:
12851
diff
changeset
|
68 \ ] |
bc17a9d37810
patch 8.1.0759: showing two characters for tab is limited
Bram Moolenaar <Bram@vim.org>
parents:
12851
diff
changeset
|
69 redraw! |
bc17a9d37810
patch 8.1.0759: showing two characters for tab is limited
Bram Moolenaar <Bram@vim.org>
parents:
12851
diff
changeset
|
70 for i in range(1, 5) |
bc17a9d37810
patch 8.1.0759: showing two characters for tab is limited
Bram Moolenaar <Bram@vim.org>
parents:
12851
diff
changeset
|
71 call cursor(i, 1) |
bc17a9d37810
patch 8.1.0759: showing two characters for tab is limited
Bram Moolenaar <Bram@vim.org>
parents:
12851
diff
changeset
|
72 call assert_equal([expected[i - 1]], ScreenLines(i, virtcol('$'))) |
bc17a9d37810
patch 8.1.0759: showing two characters for tab is limited
Bram Moolenaar <Bram@vim.org>
parents:
12851
diff
changeset
|
73 endfor |
bc17a9d37810
patch 8.1.0759: showing two characters for tab is limited
Bram Moolenaar <Bram@vim.org>
parents:
12851
diff
changeset
|
74 |
bc17a9d37810
patch 8.1.0759: showing two characters for tab is limited
Bram Moolenaar <Bram@vim.org>
parents:
12851
diff
changeset
|
75 set listchars-=tab:<=> |
bc17a9d37810
patch 8.1.0759: showing two characters for tab is limited
Bram Moolenaar <Bram@vim.org>
parents:
12851
diff
changeset
|
76 set listchars+=tab:>- |
12851
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
77 set listchars+=trail:< |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
78 set nolist |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
79 normal ggdG |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
80 call append(0, [ |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
81 \ ' fff ', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
82 \ ' gg ', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
83 \ ' h ', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
84 \ 'iii ', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
85 \ ]) |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
86 let l = split(execute("%list"), "\n") |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
87 call assert_equal([ |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
88 \ '..fff>--<<$', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
89 \ '>-------gg>-----$', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
90 \ '.....h>-$', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
91 \ 'iii<<<<><<$', '$'], l) |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
92 |
15715
52930462eec4
patch 8.1.0865: when 'listchars' only contains "nbsp:X" it does not work
Bram Moolenaar <Bram@vim.org>
parents:
15502
diff
changeset
|
93 |
52930462eec4
patch 8.1.0865: when 'listchars' only contains "nbsp:X" it does not work
Bram Moolenaar <Bram@vim.org>
parents:
15502
diff
changeset
|
94 " test nbsp |
52930462eec4
patch 8.1.0865: when 'listchars' only contains "nbsp:X" it does not work
Bram Moolenaar <Bram@vim.org>
parents:
15502
diff
changeset
|
95 normal ggdG |
52930462eec4
patch 8.1.0865: when 'listchars' only contains "nbsp:X" it does not work
Bram Moolenaar <Bram@vim.org>
parents:
15502
diff
changeset
|
96 set listchars=nbsp:X,trail:Y |
52930462eec4
patch 8.1.0865: when 'listchars' only contains "nbsp:X" it does not work
Bram Moolenaar <Bram@vim.org>
parents:
15502
diff
changeset
|
97 set list |
52930462eec4
patch 8.1.0865: when 'listchars' only contains "nbsp:X" it does not work
Bram Moolenaar <Bram@vim.org>
parents:
15502
diff
changeset
|
98 " Non-breaking space |
52930462eec4
patch 8.1.0865: when 'listchars' only contains "nbsp:X" it does not work
Bram Moolenaar <Bram@vim.org>
parents:
15502
diff
changeset
|
99 let nbsp = nr2char(0xa0) |
52930462eec4
patch 8.1.0865: when 'listchars' only contains "nbsp:X" it does not work
Bram Moolenaar <Bram@vim.org>
parents:
15502
diff
changeset
|
100 call append(0, [ ">".nbsp."<" ]) |
52930462eec4
patch 8.1.0865: when 'listchars' only contains "nbsp:X" it does not work
Bram Moolenaar <Bram@vim.org>
parents:
15502
diff
changeset
|
101 |
52930462eec4
patch 8.1.0865: when 'listchars' only contains "nbsp:X" it does not work
Bram Moolenaar <Bram@vim.org>
parents:
15502
diff
changeset
|
102 let expected = '>X< ' |
52930462eec4
patch 8.1.0865: when 'listchars' only contains "nbsp:X" it does not work
Bram Moolenaar <Bram@vim.org>
parents:
15502
diff
changeset
|
103 |
52930462eec4
patch 8.1.0865: when 'listchars' only contains "nbsp:X" it does not work
Bram Moolenaar <Bram@vim.org>
parents:
15502
diff
changeset
|
104 redraw! |
52930462eec4
patch 8.1.0865: when 'listchars' only contains "nbsp:X" it does not work
Bram Moolenaar <Bram@vim.org>
parents:
15502
diff
changeset
|
105 call cursor(1, 1) |
52930462eec4
patch 8.1.0865: when 'listchars' only contains "nbsp:X" it does not work
Bram Moolenaar <Bram@vim.org>
parents:
15502
diff
changeset
|
106 call assert_equal([expected], ScreenLines(1, virtcol('$'))) |
52930462eec4
patch 8.1.0865: when 'listchars' only contains "nbsp:X" it does not work
Bram Moolenaar <Bram@vim.org>
parents:
15502
diff
changeset
|
107 |
52930462eec4
patch 8.1.0865: when 'listchars' only contains "nbsp:X" it does not work
Bram Moolenaar <Bram@vim.org>
parents:
15502
diff
changeset
|
108 set listchars=nbsp:X |
52930462eec4
patch 8.1.0865: when 'listchars' only contains "nbsp:X" it does not work
Bram Moolenaar <Bram@vim.org>
parents:
15502
diff
changeset
|
109 redraw! |
52930462eec4
patch 8.1.0865: when 'listchars' only contains "nbsp:X" it does not work
Bram Moolenaar <Bram@vim.org>
parents:
15502
diff
changeset
|
110 call cursor(1, 1) |
52930462eec4
patch 8.1.0865: when 'listchars' only contains "nbsp:X" it does not work
Bram Moolenaar <Bram@vim.org>
parents:
15502
diff
changeset
|
111 call assert_equal([expected], ScreenLines(1, virtcol('$'))) |
52930462eec4
patch 8.1.0865: when 'listchars' only contains "nbsp:X" it does not work
Bram Moolenaar <Bram@vim.org>
parents:
15502
diff
changeset
|
112 |
12851
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
113 enew! |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
114 set listchars& ff& |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
115 endfunc |
16146
aaa6e9a43a60
patch 8.1.1078: when 'listchars' is set a composing char on a space is wrong
Bram Moolenaar <Bram@vim.org>
parents:
15715
diff
changeset
|
116 |
aaa6e9a43a60
patch 8.1.1078: when 'listchars' is set a composing char on a space is wrong
Bram Moolenaar <Bram@vim.org>
parents:
15715
diff
changeset
|
117 func Test_listchars_composing() |
aaa6e9a43a60
patch 8.1.1078: when 'listchars' is set a composing char on a space is wrong
Bram Moolenaar <Bram@vim.org>
parents:
15715
diff
changeset
|
118 enew! |
aaa6e9a43a60
patch 8.1.1078: when 'listchars' is set a composing char on a space is wrong
Bram Moolenaar <Bram@vim.org>
parents:
15715
diff
changeset
|
119 let oldencoding=&encoding |
aaa6e9a43a60
patch 8.1.1078: when 'listchars' is set a composing char on a space is wrong
Bram Moolenaar <Bram@vim.org>
parents:
15715
diff
changeset
|
120 set encoding=utf-8 |
aaa6e9a43a60
patch 8.1.1078: when 'listchars' is set a composing char on a space is wrong
Bram Moolenaar <Bram@vim.org>
parents:
15715
diff
changeset
|
121 set ff=unix |
aaa6e9a43a60
patch 8.1.1078: when 'listchars' is set a composing char on a space is wrong
Bram Moolenaar <Bram@vim.org>
parents:
15715
diff
changeset
|
122 set list |
aaa6e9a43a60
patch 8.1.1078: when 'listchars' is set a composing char on a space is wrong
Bram Moolenaar <Bram@vim.org>
parents:
15715
diff
changeset
|
123 |
aaa6e9a43a60
patch 8.1.1078: when 'listchars' is set a composing char on a space is wrong
Bram Moolenaar <Bram@vim.org>
parents:
15715
diff
changeset
|
124 set listchars=eol:$,space:_ |
aaa6e9a43a60
patch 8.1.1078: when 'listchars' is set a composing char on a space is wrong
Bram Moolenaar <Bram@vim.org>
parents:
15715
diff
changeset
|
125 call append(0, [ |
aaa6e9a43a60
patch 8.1.1078: when 'listchars' is set a composing char on a space is wrong
Bram Moolenaar <Bram@vim.org>
parents:
15715
diff
changeset
|
126 \ " \u3099 \u309A" |
aaa6e9a43a60
patch 8.1.1078: when 'listchars' is set a composing char on a space is wrong
Bram Moolenaar <Bram@vim.org>
parents:
15715
diff
changeset
|
127 \ ]) |
aaa6e9a43a60
patch 8.1.1078: when 'listchars' is set a composing char on a space is wrong
Bram Moolenaar <Bram@vim.org>
parents:
15715
diff
changeset
|
128 let expected = [ |
aaa6e9a43a60
patch 8.1.1078: when 'listchars' is set a composing char on a space is wrong
Bram Moolenaar <Bram@vim.org>
parents:
15715
diff
changeset
|
129 \ "_ \u3099^I \u309A$" |
aaa6e9a43a60
patch 8.1.1078: when 'listchars' is set a composing char on a space is wrong
Bram Moolenaar <Bram@vim.org>
parents:
15715
diff
changeset
|
130 \ ] |
aaa6e9a43a60
patch 8.1.1078: when 'listchars' is set a composing char on a space is wrong
Bram Moolenaar <Bram@vim.org>
parents:
15715
diff
changeset
|
131 redraw! |
aaa6e9a43a60
patch 8.1.1078: when 'listchars' is set a composing char on a space is wrong
Bram Moolenaar <Bram@vim.org>
parents:
15715
diff
changeset
|
132 call cursor(1, 1) |
16148
90b0f2227d73
patch 8.1.1079: no need for a separate ScreenLinesUtf8() test function
Bram Moolenaar <Bram@vim.org>
parents:
16146
diff
changeset
|
133 let got = ScreenLines(1, virtcol('$')) |
16146
aaa6e9a43a60
patch 8.1.1078: when 'listchars' is set a composing char on a space is wrong
Bram Moolenaar <Bram@vim.org>
parents:
15715
diff
changeset
|
134 bw! |
aaa6e9a43a60
patch 8.1.1078: when 'listchars' is set a composing char on a space is wrong
Bram Moolenaar <Bram@vim.org>
parents:
15715
diff
changeset
|
135 call assert_equal(expected, got) |
aaa6e9a43a60
patch 8.1.1078: when 'listchars' is set a composing char on a space is wrong
Bram Moolenaar <Bram@vim.org>
parents:
15715
diff
changeset
|
136 let &encoding=oldencoding |
aaa6e9a43a60
patch 8.1.1078: when 'listchars' is set a composing char on a space is wrong
Bram Moolenaar <Bram@vim.org>
parents:
15715
diff
changeset
|
137 set listchars& ff& |
aaa6e9a43a60
patch 8.1.1078: when 'listchars' is set a composing char on a space is wrong
Bram Moolenaar <Bram@vim.org>
parents:
15715
diff
changeset
|
138 endfunction |