Mercurial > vim
annotate src/testdir/test_vartabs.vim @ 14591:96878f6f5d4c v8.1.0309
patch 8.1.0309: profiling does not show a count for condition lines
commit https://github.com/vim/vim/commit/7feb35e7782907b44659a2748ff5d7489deeed74
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Aug 21 17:49:54 2018 +0200
patch 8.1.0309: profiling does not show a count for condition lines
Problem: Profiling does not show a count for condition lines. (Daniel
Hahler)
Solution: Count lines when not skipping. (Ozaki Kiichi, closes #2499)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 21 Aug 2018 18:00:08 +0200 |
parents | 539b070778b0 |
children | dc54785f9a1d |
rev | line source |
---|---|
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 " Test for variable tabstops |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
3 if !has("vartabs") |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 finish |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 endif |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 |
14198
9ca8c36869ce
patch 8.1.0116: display problem with 'vartabstop' and 'linebreak'
Christian Brabandt <cb@256bit.org>
parents:
14175
diff
changeset
|
7 source view_util.vim |
9ca8c36869ce
patch 8.1.0116: display problem with 'vartabstop' and 'linebreak'
Christian Brabandt <cb@256bit.org>
parents:
14175
diff
changeset
|
8 function! s:compare_lines(expect, actual) |
9ca8c36869ce
patch 8.1.0116: display problem with 'vartabstop' and 'linebreak'
Christian Brabandt <cb@256bit.org>
parents:
14175
diff
changeset
|
9 call assert_equal(join(a:expect, "\n"), join(a:actual, "\n")) |
9ca8c36869ce
patch 8.1.0116: display problem with 'vartabstop' and 'linebreak'
Christian Brabandt <cb@256bit.org>
parents:
14175
diff
changeset
|
10 endfunction |
9ca8c36869ce
patch 8.1.0116: display problem with 'vartabstop' and 'linebreak'
Christian Brabandt <cb@256bit.org>
parents:
14175
diff
changeset
|
11 |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
12 func! Test_vartabs() |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
13 new |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
14 %d |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
15 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
16 " Test normal operation of tabstops ... |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
17 set ts=4 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
18 call setline(1, join(split('aaaaa', '\zs'), "\t")) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
19 retab 8 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
20 let expect = "a a\<tab>a a\<tab>a" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
21 call assert_equal(expect, getline(1)) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
22 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
23 " ... and softtabstops |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
24 set ts=8 sts=6 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
25 exe "norm! Sb\<tab>b\<tab>b\<tab>b\<tab>b" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
26 let expect = "b b\<tab> b\<tab> b\<tab>b" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
27 call assert_equal(expect, getline(1)) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
28 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
29 " Test variable tabstops. |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
30 set sts=0 vts=4,8,4,8 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
31 exe "norm! Sc\<tab>c\<tab>c\<tab>c\<tab>c\<tab>c" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
32 retab 8 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
33 let expect = "c c\<tab> c\<tab>c\<tab>c\<tab>c" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
34 call assert_equal(expect, getline(1)) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
35 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
36 set et vts=4,8,4,8 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
37 exe "norm! Sd\<tab>d\<tab>d\<tab>d\<tab>d\<tab>d" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
38 let expect = "d d d d d d" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
39 call assert_equal(expect, getline(1)) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
40 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
41 " Changing ts should have no effect if vts is in use. |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
42 call cursor(1, 1) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
43 set ts=6 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
44 exe "norm! Se\<tab>e\<tab>e\<tab>e\<tab>e\<tab>e" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
45 let expect = "e e e e e e" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
46 call assert_equal(expect, getline(1)) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
47 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
48 " Clearing vts should revert to using ts. |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
49 set vts= |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
50 exe "norm! Sf\<tab>f\<tab>f\<tab>f\<tab>f\<tab>f" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
51 let expect = "f f f f f f" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
52 call assert_equal(expect, getline(1)) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
53 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
54 " Test variable softtabstops. |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
55 set noet ts=8 vsts=12,2,6 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
56 exe "norm! Sg\<tab>g\<tab>g\<tab>g\<tab>g\<tab>g" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
57 let expect = "g\<tab> g g\<tab> g\<tab> g\<tab>g" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
58 call assert_equal(expect, getline(1)) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
59 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
60 " Variable tabstops and softtabstops combined. |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
61 set vsts=6,12,8 vts=4,6,8 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
62 exe "norm! Sh\<tab>h\<tab>h\<tab>h\<tab>h" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
63 let expect = "h\<tab> h\<tab>\<tab>h\<tab>h\<tab>h" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
64 call assert_equal(expect, getline(1)) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
65 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
66 " Retab with a single value, not using vts. |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
67 set ts=8 sts=0 vts= vsts= |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
68 exe "norm! Si\<tab>i\<tab>i\<tab>i\<tab>i" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
69 retab 4 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
70 let expect = "i\<tab>\<tab>i\<tab>\<tab>i\<tab>\<tab>i\<tab>\<tab>i" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
71 call assert_equal(expect, getline(1)) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
72 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
73 " Retab with a single value, using vts. |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
74 set ts=8 sts=0 vts=6 vsts= |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
75 exe "norm! Sj\<tab>j\<tab>j\<tab>j\<tab>j" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
76 retab 4 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
77 let expect = "j\<tab> j\<tab>\<tab>j\<tab> j\<tab>\<tab>j" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
78 call assert_equal(expect, getline(1)) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
79 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
80 " Retab with multiple values, not using vts. |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
81 set ts=6 sts=0 vts= vsts= |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
82 exe "norm! Sk\<tab>k\<tab>k\<tab>k\<tab>k\<tab>k" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
83 retab 4,8 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
84 let expect = "k\<tab> k\<tab>k k\<tab> k\<tab> k" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
85 call assert_equal(expect, getline(1)) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
86 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
87 " Retab with multiple values, using vts. |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
88 set ts=8 sts=0 vts=6 vsts= |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
89 exe "norm! Sl\<tab>l\<tab>l\<tab>l\<tab>l\<tab>l" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
90 retab 4,8 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
91 let expect = "l\<tab> l\<tab>l l\<tab> l\<tab> l" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
92 call assert_equal(expect, getline(1)) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
93 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
94 " Check that global and local values are set. |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
95 set ts=4 vts=6 sts=8 vsts=10 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
96 call assert_equal(&ts, 4) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
97 call assert_equal(&vts, '6') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
98 call assert_equal(&sts, 8) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
99 call assert_equal(&vsts, '10') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
100 new |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
101 call assert_equal(&ts, 4) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
102 call assert_equal(&vts, '6') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
103 call assert_equal(&sts, 8) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
104 call assert_equal(&vsts, '10') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
105 bwipeout! |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
106 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
107 " Check that local values only are set. |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
108 setlocal ts=5 vts=7 sts=9 vsts=11 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
109 call assert_equal(&ts, 5) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
110 call assert_equal(&vts, '7') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
111 call assert_equal(&sts, 9) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
112 call assert_equal(&vsts, '11') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
113 new |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
114 call assert_equal(&ts, 4) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
115 call assert_equal(&vts, '6') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
116 call assert_equal(&sts, 8) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
117 call assert_equal(&vsts, '10') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
118 bwipeout! |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
119 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
120 " Check that global values only are set. |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
121 setglobal ts=6 vts=8 sts=10 vsts=12 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
122 call assert_equal(&ts, 5) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
123 call assert_equal(&vts, '7') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
124 call assert_equal(&sts, 9) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
125 call assert_equal(&vsts, '11') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
126 new |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
127 call assert_equal(&ts, 6) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
128 call assert_equal(&vts, '8') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
129 call assert_equal(&sts, 10) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
130 call assert_equal(&vsts, '12') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
131 bwipeout! |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
132 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
133 set ts& vts& sts& vsts& et& |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
134 bwipeout! |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
135 endfunc |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
136 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
137 func! Test_vartabs_breakindent() |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
138 if !exists("+breakindent") |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
139 return |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
140 endif |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
141 new |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
142 %d |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
143 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
144 " Test normal operation of tabstops ... |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
145 set ts=4 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
146 call setline(1, join(split('aaaaa', '\zs'), "\t")) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
147 retab 8 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
148 let expect = "a a\<tab>a a\<tab>a" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
149 call assert_equal(expect, getline(1)) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
150 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
151 " ... and softtabstops |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
152 set ts=8 sts=6 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
153 exe "norm! Sb\<tab>b\<tab>b\<tab>b\<tab>b" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
154 let expect = "b b\<tab> b\<tab> b\<tab>b" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
155 call assert_equal(expect, getline(1)) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
156 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
157 " Test variable tabstops. |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
158 set sts=0 vts=4,8,4,8 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
159 exe "norm! Sc\<tab>c\<tab>c\<tab>c\<tab>c\<tab>c" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
160 retab 8 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
161 let expect = "c c\<tab> c\<tab>c\<tab>c\<tab>c" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
162 call assert_equal(expect, getline(1)) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
163 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
164 set et vts=4,8,4,8 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
165 exe "norm! Sd\<tab>d\<tab>d\<tab>d\<tab>d\<tab>d" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
166 let expect = "d d d d d d" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
167 call assert_equal(expect, getline(1)) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
168 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
169 " Changing ts should have no effect if vts is in use. |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
170 call cursor(1, 1) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
171 set ts=6 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
172 exe "norm! Se\<tab>e\<tab>e\<tab>e\<tab>e\<tab>e" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
173 let expect = "e e e e e e" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
174 call assert_equal(expect, getline(1)) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
175 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
176 " Clearing vts should revert to using ts. |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
177 set vts= |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
178 exe "norm! Sf\<tab>f\<tab>f\<tab>f\<tab>f\<tab>f" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
179 let expect = "f f f f f f" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
180 call assert_equal(expect, getline(1)) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
181 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
182 " Test variable softtabstops. |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
183 set noet ts=8 vsts=12,2,6 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
184 exe "norm! Sg\<tab>g\<tab>g\<tab>g\<tab>g\<tab>g" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
185 let expect = "g\<tab> g g\<tab> g\<tab> g\<tab>g" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
186 call assert_equal(expect, getline(1)) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
187 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
188 " Variable tabstops and softtabstops combined. |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
189 set vsts=6,12,8 vts=4,6,8 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
190 exe "norm! Sh\<tab>h\<tab>h\<tab>h\<tab>h" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
191 let expect = "h\<tab> h\<tab>\<tab>h\<tab>h\<tab>h" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
192 call assert_equal(expect, getline(1)) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
193 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
194 " Retab with a single value, not using vts. |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
195 set ts=8 sts=0 vts= vsts= |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
196 exe "norm! Si\<tab>i\<tab>i\<tab>i\<tab>i" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
197 retab 4 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
198 let expect = "i\<tab>\<tab>i\<tab>\<tab>i\<tab>\<tab>i\<tab>\<tab>i" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
199 call assert_equal(expect, getline(1)) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
200 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
201 " Retab with a single value, using vts. |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
202 set ts=8 sts=0 vts=6 vsts= |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
203 exe "norm! Sj\<tab>j\<tab>j\<tab>j\<tab>j" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
204 retab 4 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
205 let expect = "j\<tab> j\<tab>\<tab>j\<tab> j\<tab>\<tab>j" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
206 call assert_equal(expect, getline(1)) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
207 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
208 " Retab with multiple values, not using vts. |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
209 set ts=6 sts=0 vts= vsts= |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
210 exe "norm! Sk\<tab>k\<tab>k\<tab>k\<tab>k\<tab>k" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
211 retab 4,8 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
212 let expect = "k\<tab> k\<tab>k k\<tab> k\<tab> k" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
213 call assert_equal(expect, getline(1)) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
214 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
215 " Retab with multiple values, using vts. |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
216 set ts=8 sts=0 vts=6 vsts= |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
217 exe "norm! Sl\<tab>l\<tab>l\<tab>l\<tab>l\<tab>l" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
218 retab 4,8 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
219 let expect = "l\<tab> l\<tab>l l\<tab> l\<tab> l" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
220 call assert_equal(expect, getline(1)) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
221 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
222 " Check that global and local values are set. |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
223 set ts=4 vts=6 sts=8 vsts=10 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
224 call assert_equal(&ts, 4) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
225 call assert_equal(&vts, '6') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
226 call assert_equal(&sts, 8) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
227 call assert_equal(&vsts, '10') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
228 new |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
229 call assert_equal(&ts, 4) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
230 call assert_equal(&vts, '6') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
231 call assert_equal(&sts, 8) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
232 call assert_equal(&vsts, '10') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
233 bwipeout! |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
234 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
235 " Check that local values only are set. |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
236 setlocal ts=5 vts=7 sts=9 vsts=11 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
237 call assert_equal(&ts, 5) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
238 call assert_equal(&vts, '7') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
239 call assert_equal(&sts, 9) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
240 call assert_equal(&vsts, '11') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
241 new |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
242 call assert_equal(&ts, 4) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
243 call assert_equal(&vts, '6') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
244 call assert_equal(&sts, 8) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
245 call assert_equal(&vsts, '10') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
246 bwipeout! |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
247 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
248 " Check that global values only are set. |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
249 setglobal ts=6 vts=8 sts=10 vsts=12 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
250 call assert_equal(&ts, 5) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
251 call assert_equal(&vts, '7') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
252 call assert_equal(&sts, 9) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
253 call assert_equal(&vsts, '11') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
254 new |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
255 call assert_equal(&ts, 6) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
256 call assert_equal(&vts, '8') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
257 call assert_equal(&sts, 10) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
258 call assert_equal(&vsts, '12') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
259 bwipeout! |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
260 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
261 bwipeout! |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
262 endfunc |
14198
9ca8c36869ce
patch 8.1.0116: display problem with 'vartabstop' and 'linebreak'
Christian Brabandt <cb@256bit.org>
parents:
14175
diff
changeset
|
263 |
9ca8c36869ce
patch 8.1.0116: display problem with 'vartabstop' and 'linebreak'
Christian Brabandt <cb@256bit.org>
parents:
14175
diff
changeset
|
264 func! Test_vartabs_linebreak() |
14218
539b070778b0
patch 8.1.0126: various problems with 'vartabstop'
Christian Brabandt <cb@256bit.org>
parents:
14198
diff
changeset
|
265 if winwidth(0) < 40 |
14198
9ca8c36869ce
patch 8.1.0116: display problem with 'vartabstop' and 'linebreak'
Christian Brabandt <cb@256bit.org>
parents:
14175
diff
changeset
|
266 return |
9ca8c36869ce
patch 8.1.0116: display problem with 'vartabstop' and 'linebreak'
Christian Brabandt <cb@256bit.org>
parents:
14175
diff
changeset
|
267 endif |
9ca8c36869ce
patch 8.1.0116: display problem with 'vartabstop' and 'linebreak'
Christian Brabandt <cb@256bit.org>
parents:
14175
diff
changeset
|
268 new |
14218
539b070778b0
patch 8.1.0126: various problems with 'vartabstop'
Christian Brabandt <cb@256bit.org>
parents:
14198
diff
changeset
|
269 40vnew |
14198
9ca8c36869ce
patch 8.1.0116: display problem with 'vartabstop' and 'linebreak'
Christian Brabandt <cb@256bit.org>
parents:
14175
diff
changeset
|
270 %d |
14218
539b070778b0
patch 8.1.0126: various problems with 'vartabstop'
Christian Brabandt <cb@256bit.org>
parents:
14198
diff
changeset
|
271 setl linebreak vartabstop=10,20,30,40 |
14198
9ca8c36869ce
patch 8.1.0116: display problem with 'vartabstop' and 'linebreak'
Christian Brabandt <cb@256bit.org>
parents:
14175
diff
changeset
|
272 call setline(1, "\tx\tx\tx\tx") |
9ca8c36869ce
patch 8.1.0116: display problem with 'vartabstop' and 'linebreak'
Christian Brabandt <cb@256bit.org>
parents:
14175
diff
changeset
|
273 |
14218
539b070778b0
patch 8.1.0126: various problems with 'vartabstop'
Christian Brabandt <cb@256bit.org>
parents:
14198
diff
changeset
|
274 let expect = [' x ', |
539b070778b0
patch 8.1.0126: various problems with 'vartabstop'
Christian Brabandt <cb@256bit.org>
parents:
14198
diff
changeset
|
275 \ 'x x ', |
539b070778b0
patch 8.1.0126: various problems with 'vartabstop'
Christian Brabandt <cb@256bit.org>
parents:
14198
diff
changeset
|
276 \ 'x '] |
539b070778b0
patch 8.1.0126: various problems with 'vartabstop'
Christian Brabandt <cb@256bit.org>
parents:
14198
diff
changeset
|
277 let lines = ScreenLines([1, 3], winwidth(0)) |
539b070778b0
patch 8.1.0126: various problems with 'vartabstop'
Christian Brabandt <cb@256bit.org>
parents:
14198
diff
changeset
|
278 call s:compare_lines(expect, lines) |
539b070778b0
patch 8.1.0126: various problems with 'vartabstop'
Christian Brabandt <cb@256bit.org>
parents:
14198
diff
changeset
|
279 setl list listchars=tab:>- |
539b070778b0
patch 8.1.0126: various problems with 'vartabstop'
Christian Brabandt <cb@256bit.org>
parents:
14198
diff
changeset
|
280 let expect = ['>---------x>------------------ ', |
539b070778b0
patch 8.1.0126: various problems with 'vartabstop'
Christian Brabandt <cb@256bit.org>
parents:
14198
diff
changeset
|
281 \ 'x>------------------x>------------------', |
539b070778b0
patch 8.1.0126: various problems with 'vartabstop'
Christian Brabandt <cb@256bit.org>
parents:
14198
diff
changeset
|
282 \ 'x '] |
539b070778b0
patch 8.1.0126: various problems with 'vartabstop'
Christian Brabandt <cb@256bit.org>
parents:
14198
diff
changeset
|
283 let lines = ScreenLines([1, 3], winwidth(0)) |
539b070778b0
patch 8.1.0126: various problems with 'vartabstop'
Christian Brabandt <cb@256bit.org>
parents:
14198
diff
changeset
|
284 call s:compare_lines(expect, lines) |
539b070778b0
patch 8.1.0126: various problems with 'vartabstop'
Christian Brabandt <cb@256bit.org>
parents:
14198
diff
changeset
|
285 setl linebreak vartabstop=40 |
539b070778b0
patch 8.1.0126: various problems with 'vartabstop'
Christian Brabandt <cb@256bit.org>
parents:
14198
diff
changeset
|
286 let expect = ['>---------------------------------------', |
539b070778b0
patch 8.1.0126: various problems with 'vartabstop'
Christian Brabandt <cb@256bit.org>
parents:
14198
diff
changeset
|
287 \ 'x>--------------------------------------', |
539b070778b0
patch 8.1.0126: various problems with 'vartabstop'
Christian Brabandt <cb@256bit.org>
parents:
14198
diff
changeset
|
288 \ 'x>--------------------------------------', |
539b070778b0
patch 8.1.0126: various problems with 'vartabstop'
Christian Brabandt <cb@256bit.org>
parents:
14198
diff
changeset
|
289 \ 'x>--------------------------------------', |
539b070778b0
patch 8.1.0126: various problems with 'vartabstop'
Christian Brabandt <cb@256bit.org>
parents:
14198
diff
changeset
|
290 \ 'x '] |
539b070778b0
patch 8.1.0126: various problems with 'vartabstop'
Christian Brabandt <cb@256bit.org>
parents:
14198
diff
changeset
|
291 let lines = ScreenLines([1, 5], winwidth(0)) |
14198
9ca8c36869ce
patch 8.1.0116: display problem with 'vartabstop' and 'linebreak'
Christian Brabandt <cb@256bit.org>
parents:
14175
diff
changeset
|
292 call s:compare_lines(expect, lines) |
9ca8c36869ce
patch 8.1.0116: display problem with 'vartabstop' and 'linebreak'
Christian Brabandt <cb@256bit.org>
parents:
14175
diff
changeset
|
293 |
9ca8c36869ce
patch 8.1.0116: display problem with 'vartabstop' and 'linebreak'
Christian Brabandt <cb@256bit.org>
parents:
14175
diff
changeset
|
294 " cleanup |
9ca8c36869ce
patch 8.1.0116: display problem with 'vartabstop' and 'linebreak'
Christian Brabandt <cb@256bit.org>
parents:
14175
diff
changeset
|
295 bw! |
9ca8c36869ce
patch 8.1.0116: display problem with 'vartabstop' and 'linebreak'
Christian Brabandt <cb@256bit.org>
parents:
14175
diff
changeset
|
296 bw! |
14218
539b070778b0
patch 8.1.0126: various problems with 'vartabstop'
Christian Brabandt <cb@256bit.org>
parents:
14198
diff
changeset
|
297 set nolist listchars&vim |
14198
9ca8c36869ce
patch 8.1.0116: display problem with 'vartabstop' and 'linebreak'
Christian Brabandt <cb@256bit.org>
parents:
14175
diff
changeset
|
298 endfunc |