Mercurial > vim
annotate src/testdir/test_breakindent.vim @ 31680:24d9c23bf665 v9.0.1172
patch 9.0.1172: when 'selection' is "exclusive" then "1v" is one char short
Commit: https://github.com/vim/vim/commit/79c11e399be3d96ed6d1c7458b1380e878ec717b
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jan 10 17:29:29 2023 +0000
patch 9.0.1172: when 'selection' is "exclusive" then "1v" is one char short
Problem: When 'selection' is "exclusive" then "1v" is one char short.
Solution: Add one character when 'selection' is "exclusive. (closes https://github.com/vim/vim/issues/11791)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 10 Jan 2023 18:30:04 +0100 |
parents | 6a03cc83fcc5 |
children | 68a12270d21b |
rev | line source |
---|---|
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 " Test for breakindent |
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 " |
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
3 " Note: if you get strange failures when adding new tests, it might be that |
19195
2ef19eed524a
patch 8.2.0156: various typos in source files and tests
Bram Moolenaar <Bram@vim.org>
parents:
19174
diff
changeset
|
4 " while the test is run, the breakindent caching gets in its way. |
10843
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
10392
diff
changeset
|
5 " It helps to change the tabstop setting and force a redraw (e.g. see |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 " Test_breakindent08()) |
17657
0da9bc55c31a
patch 8.1.1826: tests use hand coded feature and option checks
Bram Moolenaar <Bram@vim.org>
parents:
16965
diff
changeset
|
7 source check.vim |
0da9bc55c31a
patch 8.1.1826: tests use hand coded feature and option checks
Bram Moolenaar <Bram@vim.org>
parents:
16965
diff
changeset
|
8 CheckOption breakindent |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
9 |
10843
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
10392
diff
changeset
|
10 source view_util.vim |
27952
22cdc06b37bf
patch 8.2.4501: with 'showbreak' set cursor displayed in wrong position
Bram Moolenaar <Bram@vim.org>
parents:
27142
diff
changeset
|
11 source screendump.vim |
10843
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
10392
diff
changeset
|
12 |
29340
fba9e366ced4
patch 9.0.0013: reproducing memory access errors can be difficult
Bram Moolenaar <Bram@vim.org>
parents:
28716
diff
changeset
|
13 func SetUp() |
fba9e366ced4
patch 9.0.0013: reproducing memory access errors can be difficult
Bram Moolenaar <Bram@vim.org>
parents:
28716
diff
changeset
|
14 let s:input ="\tabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOP" |
fba9e366ced4
patch 9.0.0013: reproducing memory access errors can be difficult
Bram Moolenaar <Bram@vim.org>
parents:
28716
diff
changeset
|
15 endfunc |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
16 |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
17 func s:screen_lines(lnum, width) abort |
10843
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
10392
diff
changeset
|
18 return ScreenLines([a:lnum, a:lnum + 2], a:width) |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
19 endfunc |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
20 |
25248
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
21 func s:screen_lines2(lnums, lnume, width) abort |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
22 return ScreenLines([a:lnums, a:lnume], a:width) |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
23 endfunc |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
24 |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
25 func s:compare_lines(expect, actual) |
10843
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
10392
diff
changeset
|
26 call assert_equal(join(a:expect, "\n"), join(a:actual, "\n")) |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
27 endfunc |
10843
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
10392
diff
changeset
|
28 |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
29 func s:test_windows(...) |
10843
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
10392
diff
changeset
|
30 call NewWindow(10, 20) |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
10392
diff
changeset
|
31 setl ts=4 sw=4 sts=4 breakindent |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
32 put =s:input |
10843
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
10392
diff
changeset
|
33 exe get(a:000, 0, '') |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
34 endfunc |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
35 |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
36 func s:close_windows(...) |
10843
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
10392
diff
changeset
|
37 call CloseWindow() |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
10392
diff
changeset
|
38 exe get(a:000, 0, '') |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
39 endfunc |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
40 |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
41 func Test_breakindent01() |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
42 " simple breakindent test |
10843
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
10392
diff
changeset
|
43 call s:test_windows('setl briopt=min:0') |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
44 let lines = s:screen_lines(line('.'),8) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
45 let expect = [ |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
46 \ " abcd", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
47 \ " qrst", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
48 \ " GHIJ", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
49 \ ] |
10843
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
10392
diff
changeset
|
50 call s:compare_lines(expect, lines) |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
51 call s:close_windows() |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
52 endfunc |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
53 |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
54 func Test_breakindent01_vartabs() |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
55 " like 01 but with vartabs feature |
21765
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
20423
diff
changeset
|
56 CheckFeature vartabs |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
57 call s:test_windows('setl briopt=min:0 vts=4') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
58 let lines = s:screen_lines(line('.'),8) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
59 let expect = [ |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
60 \ " abcd", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
61 \ " qrst", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
62 \ " GHIJ", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
63 \ ] |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
64 call s:compare_lines(expect, lines) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
65 call s:close_windows('set vts&') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
66 endfunc |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
67 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
68 func Test_breakindent02() |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
69 " simple breakindent test with showbreak set |
18574
8b0114ffde2b
patch 8.1.2281: 'showbreak' cannot be set for one window
Bram Moolenaar <Bram@vim.org>
parents:
18502
diff
changeset
|
70 set sbr=>> |
8b0114ffde2b
patch 8.1.2281: 'showbreak' cannot be set for one window
Bram Moolenaar <Bram@vim.org>
parents:
18502
diff
changeset
|
71 call s:test_windows('setl briopt=min:0 sbr=') |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
72 let lines = s:screen_lines(line('.'),8) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
73 let expect = [ |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
74 \ " abcd", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
75 \ " >>qr", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
76 \ " >>EF", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
77 \ ] |
10843
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
10392
diff
changeset
|
78 call s:compare_lines(expect, lines) |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
79 call s:close_windows('set sbr=') |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
80 endfunc |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
81 |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
82 func Test_breakindent02_vartabs() |
21765
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
20423
diff
changeset
|
83 CheckFeature vartabs |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
84 " simple breakindent test with showbreak set |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
85 call s:test_windows('setl briopt=min:0 sbr=>> vts=4') |
30630
218363931f5d
patch 9.0.0650: some tests are failing
Bram Moolenaar <Bram@vim.org>
parents:
30110
diff
changeset
|
86 let lines = s:screen_lines(line('.'), 8) |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
87 let expect = [ |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
88 \ " abcd", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
89 \ " >>qr", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
90 \ " >>EF", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
91 \ ] |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
92 call s:compare_lines(expect, lines) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
93 call s:close_windows('set sbr= vts&') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
94 endfunc |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
95 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
96 func Test_breakindent03() |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
97 " simple breakindent test with showbreak set and briopt including sbr |
10843
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
10392
diff
changeset
|
98 call s:test_windows('setl briopt=sbr,min:0 sbr=++') |
30630
218363931f5d
patch 9.0.0650: some tests are failing
Bram Moolenaar <Bram@vim.org>
parents:
30110
diff
changeset
|
99 let lines = s:screen_lines(line('.'), 8) |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
100 let expect = [ |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
101 \ " abcd", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
102 \ "++ qrst", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
103 \ "++ GHIJ", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
104 \ ] |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
105 call s:compare_lines(expect, lines) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
106 " clean up |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
107 call s:close_windows('set sbr=') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
108 endfunc |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
109 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
110 func Test_breakindent03_vartabs() |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
111 " simple breakindent test with showbreak set and briopt including sbr |
21765
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
20423
diff
changeset
|
112 CheckFeature vartabs |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
113 call s:test_windows('setl briopt=sbr,min:0 sbr=++ vts=4') |
30630
218363931f5d
patch 9.0.0650: some tests are failing
Bram Moolenaar <Bram@vim.org>
parents:
30110
diff
changeset
|
114 let lines = s:screen_lines(line('.'), 8) |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
115 let expect = [ |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
116 \ " abcd", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
117 \ "++ qrst", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
118 \ "++ GHIJ", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
119 \ ] |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
120 call s:compare_lines(expect, lines) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
121 " clean up |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
122 call s:close_windows('set sbr= vts&') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
123 endfunc |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
124 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
125 func Test_breakindent04() |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
126 " breakindent set with min width 18 |
18574
8b0114ffde2b
patch 8.1.2281: 'showbreak' cannot be set for one window
Bram Moolenaar <Bram@vim.org>
parents:
18502
diff
changeset
|
127 set sbr=<<< |
8b0114ffde2b
patch 8.1.2281: 'showbreak' cannot be set for one window
Bram Moolenaar <Bram@vim.org>
parents:
18502
diff
changeset
|
128 call s:test_windows('setl sbr=NONE briopt=min:18') |
30630
218363931f5d
patch 9.0.0650: some tests are failing
Bram Moolenaar <Bram@vim.org>
parents:
30110
diff
changeset
|
129 let lines = s:screen_lines(line('.'), 8) |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
130 let expect = [ |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
131 \ " abcd", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
132 \ " qrstuv", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
133 \ " IJKLMN", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
134 \ ] |
10843
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
10392
diff
changeset
|
135 call s:compare_lines(expect, lines) |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
136 " clean up |
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
137 call s:close_windows('set sbr=') |
18574
8b0114ffde2b
patch 8.1.2281: 'showbreak' cannot be set for one window
Bram Moolenaar <Bram@vim.org>
parents:
18502
diff
changeset
|
138 set sbr= |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
139 endfunc |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
140 |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
141 func Test_breakindent04_vartabs() |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
142 " breakindent set with min width 18 |
21765
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
20423
diff
changeset
|
143 CheckFeature vartabs |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
144 call s:test_windows('setl sbr= briopt=min:18 vts=4') |
30630
218363931f5d
patch 9.0.0650: some tests are failing
Bram Moolenaar <Bram@vim.org>
parents:
30110
diff
changeset
|
145 let lines = s:screen_lines(line('.'), 8) |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
146 let expect = [ |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
147 \ " abcd", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
148 \ " qrstuv", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
149 \ " IJKLMN", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
150 \ ] |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
151 call s:compare_lines(expect, lines) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
152 " clean up |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
153 call s:close_windows('set sbr= vts&') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
154 endfunc |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
155 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
156 func Test_breakindent05() |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
157 " breakindent set and shift by 2 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
158 call s:test_windows('setl briopt=shift:2,min:0') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
159 let lines = s:screen_lines(line('.'),8) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
160 let expect = [ |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
161 \ " abcd", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
162 \ " qr", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
163 \ " EF", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
164 \ ] |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
165 call s:compare_lines(expect, lines) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
166 call s:close_windows() |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
167 endfunc |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
168 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
169 func Test_breakindent05_vartabs() |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
170 " breakindent set and shift by 2 |
21765
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
20423
diff
changeset
|
171 CheckFeature vartabs |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
172 call s:test_windows('setl briopt=shift:2,min:0 vts=4') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
173 let lines = s:screen_lines(line('.'),8) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
174 let expect = [ |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
175 \ " abcd", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
176 \ " qr", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
177 \ " EF", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
178 \ ] |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
179 call s:compare_lines(expect, lines) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
180 call s:close_windows('set vts&') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
181 endfunc |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
182 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
183 func Test_breakindent06() |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
184 " breakindent set and shift by -1 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
185 call s:test_windows('setl briopt=shift:-1,min:0') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
186 let lines = s:screen_lines(line('.'),8) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
187 let expect = [ |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
188 \ " abcd", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
189 \ " qrstu", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
190 \ " HIJKL", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
191 \ ] |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
192 call s:compare_lines(expect, lines) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
193 call s:close_windows() |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
194 endfunc |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
195 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
196 func Test_breakindent06_vartabs() |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
197 " breakindent set and shift by -1 |
21765
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
20423
diff
changeset
|
198 CheckFeature vartabs |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
199 call s:test_windows('setl briopt=shift:-1,min:0 vts=4') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
200 let lines = s:screen_lines(line('.'),8) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
201 let expect = [ |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
202 \ " abcd", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
203 \ " qrstu", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
204 \ " HIJKL", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
205 \ ] |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
206 call s:compare_lines(expect, lines) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
207 call s:close_windows('set vts&') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
208 endfunc |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
209 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
210 func Test_breakindent07() |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
211 " breakindent set and shift by 1, Number set sbr=? and briopt:sbr |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
212 call s:test_windows('setl briopt=shift:1,sbr,min:0 nu sbr=? nuw=4 cpo+=n') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
213 let lines = s:screen_lines(line('.'),10) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
214 let expect = [ |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
215 \ " 2 ab", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
216 \ "? m", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
217 \ "? x", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
218 \ ] |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
219 call s:compare_lines(expect, lines) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
220 " clean up |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
221 call s:close_windows('set sbr= cpo-=n') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
222 endfunc |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
223 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
224 func Test_breakindent07_vartabs() |
21765
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
20423
diff
changeset
|
225 CheckFeature vartabs |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
226 " breakindent set and shift by 1, Number set sbr=? and briopt:sbr |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
227 call s:test_windows('setl briopt=shift:1,sbr,min:0 nu sbr=? nuw=4 cpo+=n vts=4') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
228 let lines = s:screen_lines(line('.'),10) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
229 let expect = [ |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
230 \ " 2 ab", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
231 \ "? m", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
232 \ "? x", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
233 \ ] |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
234 call s:compare_lines(expect, lines) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
235 " clean up |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
236 call s:close_windows('set sbr= cpo-=n vts&') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
237 endfunc |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
238 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
239 func Test_breakindent07a() |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
240 " breakindent set and shift by 1, Number set sbr=? and briopt:sbr |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
241 call s:test_windows('setl briopt=shift:1,sbr,min:0 nu sbr=? nuw=4') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
242 let lines = s:screen_lines(line('.'),10) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
243 let expect = [ |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
244 \ " 2 ab", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
245 \ " ? m", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
246 \ " ? x", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
247 \ ] |
10843
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
10392
diff
changeset
|
248 call s:compare_lines(expect, lines) |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
249 " clean up |
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
250 call s:close_windows('set sbr=') |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
251 endfunc |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
252 |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
253 func Test_breakindent07a_vartabs() |
21765
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
20423
diff
changeset
|
254 CheckFeature vartabs |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
255 " breakindent set and shift by 1, Number set sbr=? and briopt:sbr |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
256 call s:test_windows('setl briopt=shift:1,sbr,min:0 nu sbr=? nuw=4 vts=4') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
257 let lines = s:screen_lines(line('.'),10) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
258 let expect = [ |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
259 \ " 2 ab", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
260 \ " ? m", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
261 \ " ? x", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
262 \ ] |
10843
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
10392
diff
changeset
|
263 call s:compare_lines(expect, lines) |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
264 " clean up |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
265 call s:close_windows('set sbr= vts&') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
266 endfunc |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
267 |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
268 func Test_breakindent08() |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
269 " breakindent set and shift by 1, Number and list set sbr=# and briopt:sbr |
10843
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
10392
diff
changeset
|
270 call s:test_windows('setl briopt=shift:1,sbr,min:0 nu nuw=4 sbr=# list cpo+=n ts=4') |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
271 " make sure, cache is invalidated! |
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
272 set ts=8 |
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
273 redraw! |
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
274 set ts=4 |
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
275 redraw! |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
276 let lines = s:screen_lines(line('.'),10) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
277 let expect = [ |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
278 \ " 2 ^Iabcd", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
279 \ "# opq", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
280 \ "# BCD", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
281 \ ] |
10843
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
10392
diff
changeset
|
282 call s:compare_lines(expect, lines) |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
283 call s:close_windows('set sbr= cpo-=n') |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
284 endfunc |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
285 |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
286 func Test_breakindent08_vartabs() |
21765
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
20423
diff
changeset
|
287 CheckFeature vartabs |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
288 " breakindent set and shift by 1, Number and list set sbr=# and briopt:sbr |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
289 call s:test_windows('setl briopt=shift:1,sbr,min:0 nu nuw=4 sbr=# list cpo+=n ts=4 vts=4') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
290 " make sure, cache is invalidated! |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
291 set ts=8 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
292 redraw! |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
293 set ts=4 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
294 redraw! |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
295 let lines = s:screen_lines(line('.'),10) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
296 let expect = [ |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
297 \ " 2 ^Iabcd", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
298 \ "# opq", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
299 \ "# BCD", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
300 \ ] |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
301 call s:compare_lines(expect, lines) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
302 call s:close_windows('set sbr= cpo-=n vts&') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
303 endfunc |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
304 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
305 func Test_breakindent08a() |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
306 " breakindent set and shift by 1, Number and list set sbr=# and briopt:sbr |
10843
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
10392
diff
changeset
|
307 call s:test_windows('setl briopt=shift:1,sbr,min:0 nu nuw=4 sbr=# list') |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
308 let lines = s:screen_lines(line('.'),10) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
309 let expect = [ |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
310 \ " 2 ^Iabcd", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
311 \ " # opq", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
312 \ " # BCD", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
313 \ ] |
10843
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
10392
diff
changeset
|
314 call s:compare_lines(expect, lines) |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
315 call s:close_windows('set sbr=') |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
316 endfunc |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
317 |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
318 func Test_breakindent08a_vartabs() |
21765
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
20423
diff
changeset
|
319 CheckFeature vartabs |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
320 " breakindent set and shift by 1, Number and list set sbr=# and briopt:sbr |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
321 call s:test_windows('setl briopt=shift:1,sbr,min:0 nu nuw=4 sbr=# list vts=4') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
322 let lines = s:screen_lines(line('.'),10) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
323 let expect = [ |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
324 \ " 2 ^Iabcd", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
325 \ " # opq", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
326 \ " # BCD", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
327 \ ] |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
328 call s:compare_lines(expect, lines) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
329 call s:close_windows('set sbr= vts&') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
330 endfunc |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
331 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
332 func Test_breakindent09() |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
333 " breakindent set and shift by 1, Number and list set sbr=# |
10843
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
10392
diff
changeset
|
334 call s:test_windows('setl briopt=shift:1,min:0 nu nuw=4 sbr=# list') |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
335 let lines = s:screen_lines(line('.'),10) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
336 let expect = [ |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
337 \ " 2 ^Iabcd", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
338 \ " #op", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
339 \ " #AB", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
340 \ ] |
10843
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
10392
diff
changeset
|
341 call s:compare_lines(expect, lines) |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
342 call s:close_windows('set sbr=') |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
343 endfunc |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
344 |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
345 func Test_breakindent09_vartabs() |
21765
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
20423
diff
changeset
|
346 CheckFeature vartabs |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
347 " breakindent set and shift by 1, Number and list set sbr=# |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
348 call s:test_windows('setl briopt=shift:1,min:0 nu nuw=4 sbr=# list vts=4') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
349 let lines = s:screen_lines(line('.'),10) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
350 let expect = [ |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
351 \ " 2 ^Iabcd", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
352 \ " #op", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
353 \ " #AB", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
354 \ ] |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
355 call s:compare_lines(expect, lines) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
356 call s:close_windows('set sbr= vts&') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
357 endfunc |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
358 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
359 func Test_breakindent10() |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
360 " breakindent set, Number set sbr=~ |
10843
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
10392
diff
changeset
|
361 call s:test_windows('setl cpo+=n sbr=~ nu nuw=4 nolist briopt=sbr,min:0') |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
362 " make sure, cache is invalidated! |
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
363 set ts=8 |
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
364 redraw! |
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
365 set ts=4 |
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
366 redraw! |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
367 let lines = s:screen_lines(line('.'),10) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
368 let expect = [ |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
369 \ " 2 ab", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
370 \ "~ mn", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
371 \ "~ yz", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
372 \ ] |
10843
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
10392
diff
changeset
|
373 call s:compare_lines(expect, lines) |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
374 call s:close_windows('set sbr= cpo-=n') |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
375 endfunc |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
376 |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
377 func Test_breakindent10_vartabs() |
21765
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
20423
diff
changeset
|
378 CheckFeature vartabs |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
379 " breakindent set, Number set sbr=~ |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
380 call s:test_windows('setl cpo+=n sbr=~ nu nuw=4 nolist briopt=sbr,min:0 vts=4') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
381 " make sure, cache is invalidated! |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
382 set ts=8 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
383 redraw! |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
384 set ts=4 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
385 redraw! |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
386 let lines = s:screen_lines(line('.'),10) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
387 let expect = [ |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
388 \ " 2 ab", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
389 \ "~ mn", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
390 \ "~ yz", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
391 \ ] |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
392 call s:compare_lines(expect, lines) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
393 call s:close_windows('set sbr= cpo-=n vts&') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
394 endfunc |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
395 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
396 func Test_breakindent11() |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
397 " test strdisplaywidth() |
10843
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
10392
diff
changeset
|
398 call s:test_windows('setl cpo-=n sbr=>> nu nuw=4 nolist briopt= ts=4') |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
399 let text = getline(2) |
17914
af3d441845cd
patch 8.1.1953: more functions can be used as a method
Bram Moolenaar <Bram@vim.org>
parents:
17657
diff
changeset
|
400 let width = strlen(text[1:]) + indent(2) + strlen(&sbr) * 3 " text wraps 3 times |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
401 call assert_equal(width, strdisplaywidth(text)) |
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
402 call s:close_windows('set sbr=') |
19783
546bdeef35f1
patch 8.2.0448: various functions not properly tested
Bram Moolenaar <Bram@vim.org>
parents:
19501
diff
changeset
|
403 call assert_equal(4, strdisplaywidth("\t", 4)) |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
404 endfunc |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
405 |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
406 func Test_breakindent11_vartabs() |
21765
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
20423
diff
changeset
|
407 CheckFeature vartabs |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
408 " test strdisplaywidth() |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
409 call s:test_windows('setl cpo-=n sbr=>> nu nuw=4 nolist briopt= ts=4 vts=4') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
410 let text = getline(2) |
17914
af3d441845cd
patch 8.1.1953: more functions can be used as a method
Bram Moolenaar <Bram@vim.org>
parents:
17657
diff
changeset
|
411 let width = strlen(text[1:]) + 2->indent() + strlen(&sbr) * 3 " text wraps 3 times |
18017
988e5a868b60
patch 8.1.2004: more functions can be used as methods
Bram Moolenaar <Bram@vim.org>
parents:
17914
diff
changeset
|
412 call assert_equal(width, text->strdisplaywidth()) |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
413 call s:close_windows('set sbr= vts&') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
414 endfunc |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
415 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
416 func Test_breakindent12() |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
417 " test breakindent with long indent |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
418 let s:input = "\t\t\t\t\t{" |
10843
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
10392
diff
changeset
|
419 call s:test_windows('setl breakindent linebreak briopt=min:10 nu numberwidth=3 ts=4 list listchars=tab:>-') |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
420 let lines = s:screen_lines(2,16) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
421 let expect = [ |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
422 \ " 2 >--->--->--->", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
423 \ " ---{ ", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
424 \ "~ ", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
425 \ ] |
10843
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
10392
diff
changeset
|
426 call s:compare_lines(expect, lines) |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
427 call s:close_windows('set nuw=4 listchars=') |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
428 endfunc |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
429 |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
430 func Test_breakindent12_vartabs() |
21765
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
20423
diff
changeset
|
431 CheckFeature vartabs |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
432 " test breakindent with long indent |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
433 let s:input = "\t\t\t\t\t{" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
434 call s:test_windows('setl breakindent linebreak briopt=min:10 nu numberwidth=3 ts=4 list listchars=tab:>- vts=4') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
435 let lines = s:screen_lines(2,16) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
436 let expect = [ |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
437 \ " 2 >--->--->--->", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
438 \ " ---{ ", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
439 \ "~ ", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
440 \ ] |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
441 call s:compare_lines(expect, lines) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
442 call s:close_windows('set nuw=4 listchars= vts&') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
443 endfunc |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
444 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
445 func Test_breakindent13() |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
446 let s:input = "" |
10843
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
10392
diff
changeset
|
447 call s:test_windows('setl breakindent briopt=min:10 ts=8') |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
448 vert resize 20 |
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
449 call setline(1, [" a\tb\tc\td\te", " z y x w v"]) |
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
450 1 |
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
451 norm! fbgj"ayl |
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
452 2 |
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
453 norm! fygj"byl |
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
454 call assert_equal('d', @a) |
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
455 call assert_equal('w', @b) |
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
456 call s:close_windows() |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
457 endfunc |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
458 |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
459 func Test_breakindent13_vartabs() |
21765
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
20423
diff
changeset
|
460 CheckFeature vartabs |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
461 let s:input = "" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
462 call s:test_windows('setl breakindent briopt=min:10 ts=8 vts=8') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
463 vert resize 20 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
464 call setline(1, [" a\tb\tc\td\te", " z y x w v"]) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
465 1 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
466 norm! fbgj"ayl |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
467 2 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
468 norm! fygj"byl |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
469 call assert_equal('d', @a) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
470 call assert_equal('w', @b) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
471 call s:close_windows('set vts&') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
472 endfunc |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
473 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
474 func Test_breakindent14() |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
475 let s:input = "" |
10843
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
10392
diff
changeset
|
476 call s:test_windows('setl breakindent briopt= ts=8') |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
477 vert resize 30 |
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
478 norm! 3a1234567890 |
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
479 norm! a abcde |
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
480 exec "norm! 0\<C-V>tex" |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
481 let lines = s:screen_lines(line('.'),8) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
482 let expect = [ |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
483 \ "e ", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
484 \ "~ ", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
485 \ "~ ", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
486 \ ] |
10843
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
10392
diff
changeset
|
487 call s:compare_lines(expect, lines) |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
488 call s:close_windows() |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
489 endfunc |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
490 |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
491 func Test_breakindent14_vartabs() |
21765
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
20423
diff
changeset
|
492 CheckFeature vartabs |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
493 let s:input = "" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
494 call s:test_windows('setl breakindent briopt= ts=8 vts=8') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
495 vert resize 30 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
496 norm! 3a1234567890 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
497 norm! a abcde |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
498 exec "norm! 0\<C-V>tex" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
499 let lines = s:screen_lines(line('.'),8) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
500 let expect = [ |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
501 \ "e ", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
502 \ "~ ", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
503 \ "~ ", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
504 \ ] |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
505 call s:compare_lines(expect, lines) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
506 call s:close_windows('set vts&') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
507 endfunc |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
508 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
509 func Test_breakindent15() |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
510 let s:input = "" |
10843
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
10392
diff
changeset
|
511 call s:test_windows('setl breakindent briopt= ts=8 sw=8') |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
512 vert resize 30 |
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
513 norm! 4a1234567890 |
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
514 exe "normal! >>\<C-V>3f0x" |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
515 let lines = s:screen_lines(line('.'),20) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
516 let expect = [ |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
517 \ " 1234567890 ", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
518 \ "~ ", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
519 \ "~ ", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
520 \ ] |
10843
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
10392
diff
changeset
|
521 call s:compare_lines(expect, lines) |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
522 call s:close_windows() |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
523 endfunc |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
524 |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
525 func Test_breakindent15_vartabs() |
21765
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
20423
diff
changeset
|
526 CheckFeature vartabs |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
527 let s:input = "" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
528 call s:test_windows('setl breakindent briopt= ts=8 sw=8 vts=8') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
529 vert resize 30 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
530 norm! 4a1234567890 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
531 exe "normal! >>\<C-V>3f0x" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
532 let lines = s:screen_lines(line('.'),20) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
533 let expect = [ |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
534 \ " 1234567890 ", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
535 \ "~ ", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
536 \ "~ ", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
537 \ ] |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
538 call s:compare_lines(expect, lines) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
539 call s:close_windows('set vts&') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
540 endfunc |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
541 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
542 func Test_breakindent16() |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
543 " Check that overlong lines are indented correctly. |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
544 let s:input = "" |
10843
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
10392
diff
changeset
|
545 call s:test_windows('setl breakindent briopt=min:0 ts=4') |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
546 call setline(1, "\t".repeat("1234567890", 10)) |
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
547 resize 6 |
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
548 norm! 1gg$ |
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
549 redraw! |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
550 let lines = s:screen_lines(1,10) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
551 let expect = [ |
30630
218363931f5d
patch 9.0.0650: some tests are failing
Bram Moolenaar <Bram@vim.org>
parents:
30110
diff
changeset
|
552 \ "<<< 789012", |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
553 \ " 345678", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
554 \ " 901234", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
555 \ ] |
10843
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
10392
diff
changeset
|
556 call s:compare_lines(expect, lines) |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
557 let lines = s:screen_lines(4,10) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
558 let expect = [ |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
559 \ " 567890", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
560 \ " 123456", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
561 \ " 7890 ", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
562 \ ] |
10843
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
10392
diff
changeset
|
563 call s:compare_lines(expect, lines) |
10392
957a1d560bda
commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
564 call s:close_windows() |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
565 endfunc |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
566 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
567 func Test_breakindent16_vartabs() |
21765
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
20423
diff
changeset
|
568 CheckFeature vartabs |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
569 " Check that overlong lines are indented correctly. |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
570 let s:input = "" |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
571 call s:test_windows('setl breakindent briopt=min:0 ts=4 vts=4') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
572 call setline(1, "\t".repeat("1234567890", 10)) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
573 resize 6 |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
574 norm! 1gg$ |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
575 redraw! |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
576 let lines = s:screen_lines(1,10) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
577 let expect = [ |
30630
218363931f5d
patch 9.0.0650: some tests are failing
Bram Moolenaar <Bram@vim.org>
parents:
30110
diff
changeset
|
578 \ "<<< 789012", |
14175
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
579 \ " 345678", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
580 \ " 901234", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
581 \ ] |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
582 call s:compare_lines(expect, lines) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
583 let lines = s:screen_lines(4,10) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
584 let expect = [ |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
585 \ " 567890", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
586 \ " 123456", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
587 \ " 7890 ", |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
588 \ ] |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
589 call s:compare_lines(expect, lines) |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
590 call s:close_windows('set vts&') |
2ad722003b36
patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents:
11010
diff
changeset
|
591 endfunc |
18502
3ebb15e3c28d
patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents:
18017
diff
changeset
|
592 |
3ebb15e3c28d
patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents:
18017
diff
changeset
|
593 func Test_breakindent17_vartabs() |
21765
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
20423
diff
changeset
|
594 CheckFeature vartabs |
18502
3ebb15e3c28d
patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents:
18017
diff
changeset
|
595 let s:input = "" |
3ebb15e3c28d
patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents:
18017
diff
changeset
|
596 call s:test_windows('setl breakindent list listchars=tab:<-> showbreak=+++') |
3ebb15e3c28d
patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents:
18017
diff
changeset
|
597 call setline(1, "\t" . repeat('a', 63)) |
3ebb15e3c28d
patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents:
18017
diff
changeset
|
598 vert resize 30 |
3ebb15e3c28d
patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents:
18017
diff
changeset
|
599 norm! 1gg$ |
3ebb15e3c28d
patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents:
18017
diff
changeset
|
600 redraw! |
3ebb15e3c28d
patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents:
18017
diff
changeset
|
601 let lines = s:screen_lines(1, 30) |
3ebb15e3c28d
patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents:
18017
diff
changeset
|
602 let expect = [ |
3ebb15e3c28d
patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents:
18017
diff
changeset
|
603 \ "<-->aaaaaaaaaaaaaaaaaaaaaaaaaa", |
3ebb15e3c28d
patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents:
18017
diff
changeset
|
604 \ " +++aaaaaaaaaaaaaaaaaaaaaaa", |
3ebb15e3c28d
patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents:
18017
diff
changeset
|
605 \ " +++aaaaaaaaaaaaaa ", |
3ebb15e3c28d
patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents:
18017
diff
changeset
|
606 \ ] |
3ebb15e3c28d
patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents:
18017
diff
changeset
|
607 call s:compare_lines(expect, lines) |
3ebb15e3c28d
patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents:
18017
diff
changeset
|
608 call s:close_windows('set breakindent& list& listchars& showbreak&') |
3ebb15e3c28d
patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents:
18017
diff
changeset
|
609 endfunc |
3ebb15e3c28d
patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents:
18017
diff
changeset
|
610 |
3ebb15e3c28d
patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents:
18017
diff
changeset
|
611 func Test_breakindent18_vartabs() |
21765
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
20423
diff
changeset
|
612 CheckFeature vartabs |
18502
3ebb15e3c28d
patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents:
18017
diff
changeset
|
613 let s:input = "" |
3ebb15e3c28d
patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents:
18017
diff
changeset
|
614 call s:test_windows('setl breakindent list listchars=tab:<->') |
3ebb15e3c28d
patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents:
18017
diff
changeset
|
615 call setline(1, "\t" . repeat('a', 63)) |
3ebb15e3c28d
patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents:
18017
diff
changeset
|
616 vert resize 30 |
3ebb15e3c28d
patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents:
18017
diff
changeset
|
617 norm! 1gg$ |
3ebb15e3c28d
patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents:
18017
diff
changeset
|
618 redraw! |
3ebb15e3c28d
patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents:
18017
diff
changeset
|
619 let lines = s:screen_lines(1, 30) |
3ebb15e3c28d
patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents:
18017
diff
changeset
|
620 let expect = [ |
3ebb15e3c28d
patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents:
18017
diff
changeset
|
621 \ "<-->aaaaaaaaaaaaaaaaaaaaaaaaaa", |
3ebb15e3c28d
patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents:
18017
diff
changeset
|
622 \ " aaaaaaaaaaaaaaaaaaaaaaaaaa", |
3ebb15e3c28d
patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents:
18017
diff
changeset
|
623 \ " aaaaaaaaaaa ", |
3ebb15e3c28d
patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents:
18017
diff
changeset
|
624 \ ] |
3ebb15e3c28d
patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents:
18017
diff
changeset
|
625 call s:compare_lines(expect, lines) |
3ebb15e3c28d
patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents:
18017
diff
changeset
|
626 call s:close_windows('set breakindent& list& listchars&') |
3ebb15e3c28d
patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents:
18017
diff
changeset
|
627 endfunc |
3ebb15e3c28d
patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents:
18017
diff
changeset
|
628 |
19174
d5b793803236
patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents:
18574
diff
changeset
|
629 func Test_breakindent19_sbr_nextpage() |
d5b793803236
patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents:
18574
diff
changeset
|
630 let s:input = "" |
d5b793803236
patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents:
18574
diff
changeset
|
631 call s:test_windows('setl breakindent briopt=shift:2,sbr,min:18 sbr=>') |
d5b793803236
patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents:
18574
diff
changeset
|
632 call setline(1, repeat('a', 200)) |
d5b793803236
patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents:
18574
diff
changeset
|
633 norm! 1gg |
d5b793803236
patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents:
18574
diff
changeset
|
634 redraw! |
d5b793803236
patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents:
18574
diff
changeset
|
635 let lines = s:screen_lines(1, 20) |
d5b793803236
patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents:
18574
diff
changeset
|
636 let expect = [ |
d5b793803236
patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents:
18574
diff
changeset
|
637 \ "aaaaaaaaaaaaaaaaaaaa", |
d5b793803236
patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents:
18574
diff
changeset
|
638 \ "> aaaaaaaaaaaaaaaaaa", |
d5b793803236
patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents:
18574
diff
changeset
|
639 \ "> aaaaaaaaaaaaaaaaaa", |
d5b793803236
patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents:
18574
diff
changeset
|
640 \ ] |
d5b793803236
patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents:
18574
diff
changeset
|
641 call s:compare_lines(expect, lines) |
d5b793803236
patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents:
18574
diff
changeset
|
642 " Scroll down one screen line |
d5b793803236
patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents:
18574
diff
changeset
|
643 setl scrolloff=5 |
23907
c8aa6d26e6e1
patch 8.2.2496: insufficien testing for text jumping fix
Bram Moolenaar <Bram@vim.org>
parents:
23905
diff
changeset
|
644 norm! 5gj |
19174
d5b793803236
patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents:
18574
diff
changeset
|
645 let lines = s:screen_lines(1, 20) |
d5b793803236
patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents:
18574
diff
changeset
|
646 let expect = [ |
23907
c8aa6d26e6e1
patch 8.2.2496: insufficien testing for text jumping fix
Bram Moolenaar <Bram@vim.org>
parents:
23905
diff
changeset
|
647 \ "aaaaaaaaaaaaaaaaaaaa", |
19174
d5b793803236
patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents:
18574
diff
changeset
|
648 \ "> aaaaaaaaaaaaaaaaaa", |
d5b793803236
patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents:
18574
diff
changeset
|
649 \ "> aaaaaaaaaaaaaaaaaa", |
d5b793803236
patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents:
18574
diff
changeset
|
650 \ ] |
d5b793803236
patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents:
18574
diff
changeset
|
651 call s:compare_lines(expect, lines) |
23907
c8aa6d26e6e1
patch 8.2.2496: insufficien testing for text jumping fix
Bram Moolenaar <Bram@vim.org>
parents:
23905
diff
changeset
|
652 redraw! |
c8aa6d26e6e1
patch 8.2.2496: insufficien testing for text jumping fix
Bram Moolenaar <Bram@vim.org>
parents:
23905
diff
changeset
|
653 " moving the cursor doesn't change the text offset |
c8aa6d26e6e1
patch 8.2.2496: insufficien testing for text jumping fix
Bram Moolenaar <Bram@vim.org>
parents:
23905
diff
changeset
|
654 norm! l |
c8aa6d26e6e1
patch 8.2.2496: insufficien testing for text jumping fix
Bram Moolenaar <Bram@vim.org>
parents:
23905
diff
changeset
|
655 redraw! |
c8aa6d26e6e1
patch 8.2.2496: insufficien testing for text jumping fix
Bram Moolenaar <Bram@vim.org>
parents:
23905
diff
changeset
|
656 let lines = s:screen_lines(1, 20) |
c8aa6d26e6e1
patch 8.2.2496: insufficien testing for text jumping fix
Bram Moolenaar <Bram@vim.org>
parents:
23905
diff
changeset
|
657 call s:compare_lines(expect, lines) |
19501
f872daa2031b
patch 8.2.0308: 'showbreak' does not work for a very long line
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
658 |
f872daa2031b
patch 8.2.0308: 'showbreak' does not work for a very long line
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
659 setl breakindent briopt=min:18 sbr=> |
f872daa2031b
patch 8.2.0308: 'showbreak' does not work for a very long line
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
660 norm! 5gj |
f872daa2031b
patch 8.2.0308: 'showbreak' does not work for a very long line
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
661 let lines = s:screen_lines(1, 20) |
f872daa2031b
patch 8.2.0308: 'showbreak' does not work for a very long line
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
662 let expect = [ |
30693
a59a8ce13129
patch 9.0.0681: "<<<" shows for 'smoothscroll' even when 'showbreak is set
Bram Moolenaar <Bram@vim.org>
parents:
30685
diff
changeset
|
663 \ ">aaaaaaaaaaaaaaaaaaa", |
19501
f872daa2031b
patch 8.2.0308: 'showbreak' does not work for a very long line
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
664 \ ">aaaaaaaaaaaaaaaaaaa", |
f872daa2031b
patch 8.2.0308: 'showbreak' does not work for a very long line
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
665 \ ">aaaaaaaaaaaaaaaaaaa", |
f872daa2031b
patch 8.2.0308: 'showbreak' does not work for a very long line
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
666 \ ] |
f872daa2031b
patch 8.2.0308: 'showbreak' does not work for a very long line
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
667 call s:compare_lines(expect, lines) |
19174
d5b793803236
patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents:
18574
diff
changeset
|
668 call s:close_windows('set breakindent& briopt& sbr&') |
d5b793803236
patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents:
18574
diff
changeset
|
669 endfunc |
19783
546bdeef35f1
patch 8.2.0448: various functions not properly tested
Bram Moolenaar <Bram@vim.org>
parents:
19501
diff
changeset
|
670 |
20423
8c98c74176ac
patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents:
19783
diff
changeset
|
671 func Test_breakindent20_cpo_n_nextpage() |
8c98c74176ac
patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents:
19783
diff
changeset
|
672 let s:input = "" |
8c98c74176ac
patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents:
19783
diff
changeset
|
673 call s:test_windows('setl breakindent briopt=min:14 cpo+=n number') |
30685
0e58aae55486
patch 9.0.0677: breakindent test accepts wrong result
Bram Moolenaar <Bram@vim.org>
parents:
30639
diff
changeset
|
674 call setline(1, repeat('abcdefghijklmnopqrst', 10)) |
20423
8c98c74176ac
patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents:
19783
diff
changeset
|
675 norm! 1gg |
8c98c74176ac
patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents:
19783
diff
changeset
|
676 redraw! |
8c98c74176ac
patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents:
19783
diff
changeset
|
677 let lines = s:screen_lines(1, 20) |
8c98c74176ac
patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents:
19783
diff
changeset
|
678 let expect = [ |
30685
0e58aae55486
patch 9.0.0677: breakindent test accepts wrong result
Bram Moolenaar <Bram@vim.org>
parents:
30639
diff
changeset
|
679 \ " 1 abcdefghijklmnop", |
0e58aae55486
patch 9.0.0677: breakindent test accepts wrong result
Bram Moolenaar <Bram@vim.org>
parents:
30639
diff
changeset
|
680 \ " qrstabcdefghijkl", |
0e58aae55486
patch 9.0.0677: breakindent test accepts wrong result
Bram Moolenaar <Bram@vim.org>
parents:
30639
diff
changeset
|
681 \ " mnopqrstabcdefgh", |
20423
8c98c74176ac
patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents:
19783
diff
changeset
|
682 \ ] |
8c98c74176ac
patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents:
19783
diff
changeset
|
683 call s:compare_lines(expect, lines) |
8c98c74176ac
patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents:
19783
diff
changeset
|
684 " Scroll down one screen line |
8c98c74176ac
patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents:
19783
diff
changeset
|
685 setl scrolloff=5 |
30823
80a336303eb9
patch 9.0.0746: breakindent test cases are commented out
Bram Moolenaar <Bram@vim.org>
parents:
30821
diff
changeset
|
686 norm! 6gj |
20423
8c98c74176ac
patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents:
19783
diff
changeset
|
687 redraw! |
8c98c74176ac
patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents:
19783
diff
changeset
|
688 let lines = s:screen_lines(1, 20) |
8c98c74176ac
patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents:
19783
diff
changeset
|
689 let expect = [ |
30685
0e58aae55486
patch 9.0.0677: breakindent test accepts wrong result
Bram Moolenaar <Bram@vim.org>
parents:
30639
diff
changeset
|
690 \ "<<< qrstabcdefghijkl", |
0e58aae55486
patch 9.0.0677: breakindent test accepts wrong result
Bram Moolenaar <Bram@vim.org>
parents:
30639
diff
changeset
|
691 \ " mnopqrstabcdefgh", |
0e58aae55486
patch 9.0.0677: breakindent test accepts wrong result
Bram Moolenaar <Bram@vim.org>
parents:
30639
diff
changeset
|
692 \ " ijklmnopqrstabcd", |
20423
8c98c74176ac
patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents:
19783
diff
changeset
|
693 \ ] |
30823
80a336303eb9
patch 9.0.0746: breakindent test cases are commented out
Bram Moolenaar <Bram@vim.org>
parents:
30821
diff
changeset
|
694 call s:compare_lines(expect, lines) |
20423
8c98c74176ac
patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents:
19783
diff
changeset
|
695 |
8c98c74176ac
patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents:
19783
diff
changeset
|
696 setl briopt+=shift:2 |
8c98c74176ac
patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents:
19783
diff
changeset
|
697 norm! 1gg |
8c98c74176ac
patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents:
19783
diff
changeset
|
698 let lines = s:screen_lines(1, 20) |
8c98c74176ac
patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents:
19783
diff
changeset
|
699 let expect = [ |
30685
0e58aae55486
patch 9.0.0677: breakindent test accepts wrong result
Bram Moolenaar <Bram@vim.org>
parents:
30639
diff
changeset
|
700 \ " 1 abcdefghijklmnop", |
0e58aae55486
patch 9.0.0677: breakindent test accepts wrong result
Bram Moolenaar <Bram@vim.org>
parents:
30639
diff
changeset
|
701 \ " qrstabcdefghij", |
0e58aae55486
patch 9.0.0677: breakindent test accepts wrong result
Bram Moolenaar <Bram@vim.org>
parents:
30639
diff
changeset
|
702 \ " klmnopqrstabcd", |
20423
8c98c74176ac
patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents:
19783
diff
changeset
|
703 \ ] |
8c98c74176ac
patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents:
19783
diff
changeset
|
704 call s:compare_lines(expect, lines) |
8c98c74176ac
patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents:
19783
diff
changeset
|
705 " Scroll down one screen line |
30823
80a336303eb9
patch 9.0.0746: breakindent test cases are commented out
Bram Moolenaar <Bram@vim.org>
parents:
30821
diff
changeset
|
706 norm! 6gj |
20423
8c98c74176ac
patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents:
19783
diff
changeset
|
707 let lines = s:screen_lines(1, 20) |
8c98c74176ac
patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents:
19783
diff
changeset
|
708 let expect = [ |
30685
0e58aae55486
patch 9.0.0677: breakindent test accepts wrong result
Bram Moolenaar <Bram@vim.org>
parents:
30639
diff
changeset
|
709 \ "<<< qrstabcdefghij", |
0e58aae55486
patch 9.0.0677: breakindent test accepts wrong result
Bram Moolenaar <Bram@vim.org>
parents:
30639
diff
changeset
|
710 \ " klmnopqrstabcd", |
0e58aae55486
patch 9.0.0677: breakindent test accepts wrong result
Bram Moolenaar <Bram@vim.org>
parents:
30639
diff
changeset
|
711 \ " efghijklmnopqr", |
20423
8c98c74176ac
patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents:
19783
diff
changeset
|
712 \ ] |
30823
80a336303eb9
patch 9.0.0746: breakindent test cases are commented out
Bram Moolenaar <Bram@vim.org>
parents:
30821
diff
changeset
|
713 call s:compare_lines(expect, lines) |
20423
8c98c74176ac
patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents:
19783
diff
changeset
|
714 |
8c98c74176ac
patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents:
19783
diff
changeset
|
715 call s:close_windows('set breakindent& briopt& cpo& number&') |
8c98c74176ac
patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents:
19783
diff
changeset
|
716 endfunc |
8c98c74176ac
patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents:
19783
diff
changeset
|
717 |
25248
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
718 func Test_breakindent20_list() |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
719 call s:test_windows('setl breakindent breakindentopt= linebreak') |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
720 " default: |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
721 call setline(1, [' 1. Congress shall make no law', |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
722 \ ' 2.) Congress shall make no law', |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
723 \ ' 3.] Congress shall make no law']) |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
724 norm! 1gg |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
725 redraw! |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
726 let lines = s:screen_lines2(1, 6, 20) |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
727 let expect = [ |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
728 \ " 1. Congress ", |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
729 \ "shall make no law ", |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
730 \ " 2.) Congress ", |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
731 \ "shall make no law ", |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
732 \ " 3.] Congress ", |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
733 \ "shall make no law ", |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
734 \ ] |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
735 call s:compare_lines(expect, lines) |
28171
b4c111ea83b1
patch 8.2.4611: typos in tests; one lua line not covered by test
Bram Moolenaar <Bram@vim.org>
parents:
27952
diff
changeset
|
736 " set minimum indent |
25248
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
737 setl briopt=min:5 |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
738 redraw! |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
739 let lines = s:screen_lines2(1, 6, 20) |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
740 let expect = [ |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
741 \ " 1. Congress ", |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
742 \ " shall make no law ", |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
743 \ " 2.) Congress ", |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
744 \ " shall make no law ", |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
745 \ " 3.] Congress ", |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
746 \ " shall make no law ", |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
747 \ ] |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
748 call s:compare_lines(expect, lines) |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
749 " set additional handing indent |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
750 setl briopt+=list:4 |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
751 redraw! |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
752 let expect = [ |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
753 \ " 1. Congress ", |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
754 \ " shall make no ", |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
755 \ " law ", |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
756 \ " 2.) Congress ", |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
757 \ " shall make no ", |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
758 \ " law ", |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
759 \ " 3.] Congress ", |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
760 \ " shall make no ", |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
761 \ " law ", |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
762 \ ] |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
763 let lines = s:screen_lines2(1, 9, 20) |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
764 call s:compare_lines(expect, lines) |
25322
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
765 |
25248
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
766 " reset linebreak option |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
767 " Note: it indents by one additional |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
768 " space, because of the leading space. |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
769 setl linebreak&vim list listchars=eol:$,space:_ |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
770 redraw! |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
771 let expect = [ |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
772 \ "__1.__Congress_shall", |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
773 \ " _make_no_law$ ", |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
774 \ "__2.)_Congress_shall", |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
775 \ " _make_no_law$ ", |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
776 \ "__3.]_Congress_shall", |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
777 \ " _make_no_law$ ", |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
778 \ ] |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
779 let lines = s:screen_lines2(1, 6, 20) |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
780 call s:compare_lines(expect, lines) |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
781 |
25322
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
782 " check formatlistpat indent |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
783 setl briopt=min:5,list:-1 |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
784 setl linebreak list&vim listchars&vim |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
785 let &l:flp = '^\s*\d\+\.\?[\]:)}\t ]\s*' |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
786 redraw! |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
787 let expect = [ |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
788 \ " 1. Congress ", |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
789 \ " shall make no ", |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
790 \ " law ", |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
791 \ " 2.) Congress ", |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
792 \ " shall make no ", |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
793 \ " law ", |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
794 \ " 3.] Congress ", |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
795 \ " shall make no ", |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
796 \ " law ", |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
797 \ ] |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
798 let lines = s:screen_lines2(1, 9, 20) |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
799 call s:compare_lines(expect, lines) |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
800 " check formatlistpat indent with different list levels |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
801 let &l:flp = '^\s*\*\+\s\+' |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
802 %delete _ |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
803 call setline(1, ['* Congress shall make no law', |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
804 \ '*** Congress shall make no law', |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
805 \ '**** Congress shall make no law']) |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
806 norm! 1gg |
29346
336c99d14cc5
patch 9.0.0016: comparing line pointer for 'breakindent' is not reliable
Bram Moolenaar <Bram@vim.org>
parents:
29340
diff
changeset
|
807 redraw! |
25322
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
808 let expect = [ |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
809 \ "* Congress shall ", |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
810 \ " make no law ", |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
811 \ "*** Congress shall ", |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
812 \ " make no law ", |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
813 \ "**** Congress shall ", |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
814 \ " make no law ", |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
815 \ ] |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
816 let lines = s:screen_lines2(1, 6, 20) |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
817 call s:compare_lines(expect, lines) |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
818 |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
819 " check formatlistpat indent with different list level |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
820 " showbreak and sbr |
30041
1100c9c3fd2a
patch 9.0.0358: 'breakindent' does not indent non-lists
Bram Moolenaar <Bram@vim.org>
parents:
29346
diff
changeset
|
821 setl briopt=min:5,sbr,list:-1 |
25322
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
822 setl showbreak=> |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
823 redraw! |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
824 let expect = [ |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
825 \ "* Congress shall ", |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
826 \ "> make no law ", |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
827 \ "*** Congress shall ", |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
828 \ "> make no law ", |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
829 \ "**** Congress shall ", |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
830 \ "> make no law ", |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
831 \ ] |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
832 let lines = s:screen_lines2(1, 6, 20) |
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
833 call s:compare_lines(expect, lines) |
30041
1100c9c3fd2a
patch 9.0.0358: 'breakindent' does not indent non-lists
Bram Moolenaar <Bram@vim.org>
parents:
29346
diff
changeset
|
834 |
1100c9c3fd2a
patch 9.0.0358: 'breakindent' does not indent non-lists
Bram Moolenaar <Bram@vim.org>
parents:
29346
diff
changeset
|
835 " check formatlistpat indent with different list level |
1100c9c3fd2a
patch 9.0.0358: 'breakindent' does not indent non-lists
Bram Moolenaar <Bram@vim.org>
parents:
29346
diff
changeset
|
836 " showbreak sbr and shift |
1100c9c3fd2a
patch 9.0.0358: 'breakindent' does not indent non-lists
Bram Moolenaar <Bram@vim.org>
parents:
29346
diff
changeset
|
837 setl briopt=min:5,sbr,list:-1,shift:2 |
1100c9c3fd2a
patch 9.0.0358: 'breakindent' does not indent non-lists
Bram Moolenaar <Bram@vim.org>
parents:
29346
diff
changeset
|
838 setl showbreak=> |
1100c9c3fd2a
patch 9.0.0358: 'breakindent' does not indent non-lists
Bram Moolenaar <Bram@vim.org>
parents:
29346
diff
changeset
|
839 redraw! |
1100c9c3fd2a
patch 9.0.0358: 'breakindent' does not indent non-lists
Bram Moolenaar <Bram@vim.org>
parents:
29346
diff
changeset
|
840 let expect = [ |
1100c9c3fd2a
patch 9.0.0358: 'breakindent' does not indent non-lists
Bram Moolenaar <Bram@vim.org>
parents:
29346
diff
changeset
|
841 \ "* Congress shall ", |
1100c9c3fd2a
patch 9.0.0358: 'breakindent' does not indent non-lists
Bram Moolenaar <Bram@vim.org>
parents:
29346
diff
changeset
|
842 \ "> make no law ", |
1100c9c3fd2a
patch 9.0.0358: 'breakindent' does not indent non-lists
Bram Moolenaar <Bram@vim.org>
parents:
29346
diff
changeset
|
843 \ "*** Congress shall ", |
1100c9c3fd2a
patch 9.0.0358: 'breakindent' does not indent non-lists
Bram Moolenaar <Bram@vim.org>
parents:
29346
diff
changeset
|
844 \ "> make no law ", |
1100c9c3fd2a
patch 9.0.0358: 'breakindent' does not indent non-lists
Bram Moolenaar <Bram@vim.org>
parents:
29346
diff
changeset
|
845 \ "**** Congress shall ", |
1100c9c3fd2a
patch 9.0.0358: 'breakindent' does not indent non-lists
Bram Moolenaar <Bram@vim.org>
parents:
29346
diff
changeset
|
846 \ "> make no law ", |
1100c9c3fd2a
patch 9.0.0358: 'breakindent' does not indent non-lists
Bram Moolenaar <Bram@vim.org>
parents:
29346
diff
changeset
|
847 \ ] |
1100c9c3fd2a
patch 9.0.0358: 'breakindent' does not indent non-lists
Bram Moolenaar <Bram@vim.org>
parents:
29346
diff
changeset
|
848 let lines = s:screen_lines2(1, 6, 20) |
1100c9c3fd2a
patch 9.0.0358: 'breakindent' does not indent non-lists
Bram Moolenaar <Bram@vim.org>
parents:
29346
diff
changeset
|
849 call s:compare_lines(expect, lines) |
1100c9c3fd2a
patch 9.0.0358: 'breakindent' does not indent non-lists
Bram Moolenaar <Bram@vim.org>
parents:
29346
diff
changeset
|
850 |
1100c9c3fd2a
patch 9.0.0358: 'breakindent' does not indent non-lists
Bram Moolenaar <Bram@vim.org>
parents:
29346
diff
changeset
|
851 " check breakindent works if breakindentopt=list:-1 |
1100c9c3fd2a
patch 9.0.0358: 'breakindent' does not indent non-lists
Bram Moolenaar <Bram@vim.org>
parents:
29346
diff
changeset
|
852 " for a non list content |
1100c9c3fd2a
patch 9.0.0358: 'breakindent' does not indent non-lists
Bram Moolenaar <Bram@vim.org>
parents:
29346
diff
changeset
|
853 %delete _ |
1100c9c3fd2a
patch 9.0.0358: 'breakindent' does not indent non-lists
Bram Moolenaar <Bram@vim.org>
parents:
29346
diff
changeset
|
854 call setline(1, [' Congress shall make no law', |
1100c9c3fd2a
patch 9.0.0358: 'breakindent' does not indent non-lists
Bram Moolenaar <Bram@vim.org>
parents:
29346
diff
changeset
|
855 \ ' Congress shall make no law', |
1100c9c3fd2a
patch 9.0.0358: 'breakindent' does not indent non-lists
Bram Moolenaar <Bram@vim.org>
parents:
29346
diff
changeset
|
856 \ ' Congress shall make no law']) |
1100c9c3fd2a
patch 9.0.0358: 'breakindent' does not indent non-lists
Bram Moolenaar <Bram@vim.org>
parents:
29346
diff
changeset
|
857 norm! 1gg |
1100c9c3fd2a
patch 9.0.0358: 'breakindent' does not indent non-lists
Bram Moolenaar <Bram@vim.org>
parents:
29346
diff
changeset
|
858 setl briopt=min:5,list:-1 |
1100c9c3fd2a
patch 9.0.0358: 'breakindent' does not indent non-lists
Bram Moolenaar <Bram@vim.org>
parents:
29346
diff
changeset
|
859 setl showbreak= |
1100c9c3fd2a
patch 9.0.0358: 'breakindent' does not indent non-lists
Bram Moolenaar <Bram@vim.org>
parents:
29346
diff
changeset
|
860 redraw! |
1100c9c3fd2a
patch 9.0.0358: 'breakindent' does not indent non-lists
Bram Moolenaar <Bram@vim.org>
parents:
29346
diff
changeset
|
861 let expect = [ |
1100c9c3fd2a
patch 9.0.0358: 'breakindent' does not indent non-lists
Bram Moolenaar <Bram@vim.org>
parents:
29346
diff
changeset
|
862 \ " Congress shall ", |
1100c9c3fd2a
patch 9.0.0358: 'breakindent' does not indent non-lists
Bram Moolenaar <Bram@vim.org>
parents:
29346
diff
changeset
|
863 \ " make no law ", |
1100c9c3fd2a
patch 9.0.0358: 'breakindent' does not indent non-lists
Bram Moolenaar <Bram@vim.org>
parents:
29346
diff
changeset
|
864 \ " Congress shall ", |
1100c9c3fd2a
patch 9.0.0358: 'breakindent' does not indent non-lists
Bram Moolenaar <Bram@vim.org>
parents:
29346
diff
changeset
|
865 \ " make no law ", |
1100c9c3fd2a
patch 9.0.0358: 'breakindent' does not indent non-lists
Bram Moolenaar <Bram@vim.org>
parents:
29346
diff
changeset
|
866 \ " Congress shall ", |
1100c9c3fd2a
patch 9.0.0358: 'breakindent' does not indent non-lists
Bram Moolenaar <Bram@vim.org>
parents:
29346
diff
changeset
|
867 \ " make no law ", |
1100c9c3fd2a
patch 9.0.0358: 'breakindent' does not indent non-lists
Bram Moolenaar <Bram@vim.org>
parents:
29346
diff
changeset
|
868 \ ] |
1100c9c3fd2a
patch 9.0.0358: 'breakindent' does not indent non-lists
Bram Moolenaar <Bram@vim.org>
parents:
29346
diff
changeset
|
869 let lines = s:screen_lines2(1, 6, 20) |
1100c9c3fd2a
patch 9.0.0358: 'breakindent' does not indent non-lists
Bram Moolenaar <Bram@vim.org>
parents:
29346
diff
changeset
|
870 call s:compare_lines(expect, lines) |
1100c9c3fd2a
patch 9.0.0358: 'breakindent' does not indent non-lists
Bram Moolenaar <Bram@vim.org>
parents:
29346
diff
changeset
|
871 |
25322
b3d7becabe99
patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents:
25248
diff
changeset
|
872 call s:close_windows('set breakindent& briopt& linebreak& list& listchars& showbreak&') |
25248
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
873 endfunc |
cf0774d010b7
patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents:
23907
diff
changeset
|
874 |
25723
b079bdc99c18
patch 8.2.3397: no test for what 8.2.3391 fixes
Bram Moolenaar <Bram@vim.org>
parents:
25322
diff
changeset
|
875 " The following used to crash Vim. This is fixed by 8.2.3391. |
b079bdc99c18
patch 8.2.3397: no test for what 8.2.3391 fixes
Bram Moolenaar <Bram@vim.org>
parents:
25322
diff
changeset
|
876 " This is a regression introduced by 8.2.2903. |
b079bdc99c18
patch 8.2.3397: no test for what 8.2.3391 fixes
Bram Moolenaar <Bram@vim.org>
parents:
25322
diff
changeset
|
877 func Test_window_resize_with_linebreak() |
b079bdc99c18
patch 8.2.3397: no test for what 8.2.3391 fixes
Bram Moolenaar <Bram@vim.org>
parents:
25322
diff
changeset
|
878 new |
b079bdc99c18
patch 8.2.3397: no test for what 8.2.3391 fixes
Bram Moolenaar <Bram@vim.org>
parents:
25322
diff
changeset
|
879 53vnew |
28716
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
880 setl linebreak |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
881 setl showbreak=>> |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
882 setl breakindent |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
883 setl breakindentopt=shift:4 |
25723
b079bdc99c18
patch 8.2.3397: no test for what 8.2.3391 fixes
Bram Moolenaar <Bram@vim.org>
parents:
25322
diff
changeset
|
884 call setline(1, "\naaaaaaaaa\n\na\naaaaa\n¯aaaaaaaaaa\naaaaaaaaaaaa\naaa\n\"a:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - aaaaaaaa\"\naaaaaaaa\n\"a") |
b079bdc99c18
patch 8.2.3397: no test for what 8.2.3391 fixes
Bram Moolenaar <Bram@vim.org>
parents:
25322
diff
changeset
|
885 redraw! |
b079bdc99c18
patch 8.2.3397: no test for what 8.2.3391 fixes
Bram Moolenaar <Bram@vim.org>
parents:
25322
diff
changeset
|
886 call assert_equal([" >>aa^@\"a: "], ScreenLines(2, 14)) |
b079bdc99c18
patch 8.2.3397: no test for what 8.2.3391 fixes
Bram Moolenaar <Bram@vim.org>
parents:
25322
diff
changeset
|
887 vertical resize 52 |
b079bdc99c18
patch 8.2.3397: no test for what 8.2.3391 fixes
Bram Moolenaar <Bram@vim.org>
parents:
25322
diff
changeset
|
888 redraw! |
b079bdc99c18
patch 8.2.3397: no test for what 8.2.3391 fixes
Bram Moolenaar <Bram@vim.org>
parents:
25322
diff
changeset
|
889 call assert_equal([" >>aaa^@\"a:"], ScreenLines(2, 14)) |
28716
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
890 set linebreak& showbreak& breakindent& breakindentopt& |
25723
b079bdc99c18
patch 8.2.3397: no test for what 8.2.3391 fixes
Bram Moolenaar <Bram@vim.org>
parents:
25322
diff
changeset
|
891 %bw! |
b079bdc99c18
patch 8.2.3397: no test for what 8.2.3391 fixes
Bram Moolenaar <Bram@vim.org>
parents:
25322
diff
changeset
|
892 endfunc |
b079bdc99c18
patch 8.2.3397: no test for what 8.2.3391 fixes
Bram Moolenaar <Bram@vim.org>
parents:
25322
diff
changeset
|
893 |
27952
22cdc06b37bf
patch 8.2.4501: with 'showbreak' set cursor displayed in wrong position
Bram Moolenaar <Bram@vim.org>
parents:
27142
diff
changeset
|
894 func Test_cursor_position_with_showbreak() |
22cdc06b37bf
patch 8.2.4501: with 'showbreak' set cursor displayed in wrong position
Bram Moolenaar <Bram@vim.org>
parents:
27142
diff
changeset
|
895 CheckScreendump |
22cdc06b37bf
patch 8.2.4501: with 'showbreak' set cursor displayed in wrong position
Bram Moolenaar <Bram@vim.org>
parents:
27142
diff
changeset
|
896 |
22cdc06b37bf
patch 8.2.4501: with 'showbreak' set cursor displayed in wrong position
Bram Moolenaar <Bram@vim.org>
parents:
27142
diff
changeset
|
897 let lines =<< trim END |
22cdc06b37bf
patch 8.2.4501: with 'showbreak' set cursor displayed in wrong position
Bram Moolenaar <Bram@vim.org>
parents:
27142
diff
changeset
|
898 vim9script |
22cdc06b37bf
patch 8.2.4501: with 'showbreak' set cursor displayed in wrong position
Bram Moolenaar <Bram@vim.org>
parents:
27142
diff
changeset
|
899 &signcolumn = 'yes' |
22cdc06b37bf
patch 8.2.4501: with 'showbreak' set cursor displayed in wrong position
Bram Moolenaar <Bram@vim.org>
parents:
27142
diff
changeset
|
900 &showbreak = '+ ' |
22cdc06b37bf
patch 8.2.4501: with 'showbreak' set cursor displayed in wrong position
Bram Moolenaar <Bram@vim.org>
parents:
27142
diff
changeset
|
901 var leftcol: number = win_getid()->getwininfo()->get(0, {})->get('textoff') |
22cdc06b37bf
patch 8.2.4501: with 'showbreak' set cursor displayed in wrong position
Bram Moolenaar <Bram@vim.org>
parents:
27142
diff
changeset
|
902 repeat('x', &columns - leftcol - 1)->setline(1) |
22cdc06b37bf
patch 8.2.4501: with 'showbreak' set cursor displayed in wrong position
Bram Moolenaar <Bram@vim.org>
parents:
27142
diff
changeset
|
903 'second line'->setline(2) |
22cdc06b37bf
patch 8.2.4501: with 'showbreak' set cursor displayed in wrong position
Bram Moolenaar <Bram@vim.org>
parents:
27142
diff
changeset
|
904 END |
30110
ba5ca7c7d44c
patch 9.0.0391: using separate delete() call instead of writefile() 'D' flag
Bram Moolenaar <Bram@vim.org>
parents:
30041
diff
changeset
|
905 call writefile(lines, 'XscriptShowbreak', 'D') |
27952
22cdc06b37bf
patch 8.2.4501: with 'showbreak' set cursor displayed in wrong position
Bram Moolenaar <Bram@vim.org>
parents:
27142
diff
changeset
|
906 let buf = RunVimInTerminal('-S XscriptShowbreak', #{rows: 6}) |
22cdc06b37bf
patch 8.2.4501: with 'showbreak' set cursor displayed in wrong position
Bram Moolenaar <Bram@vim.org>
parents:
27142
diff
changeset
|
907 |
22cdc06b37bf
patch 8.2.4501: with 'showbreak' set cursor displayed in wrong position
Bram Moolenaar <Bram@vim.org>
parents:
27142
diff
changeset
|
908 call term_sendkeys(buf, "AX") |
22cdc06b37bf
patch 8.2.4501: with 'showbreak' set cursor displayed in wrong position
Bram Moolenaar <Bram@vim.org>
parents:
27142
diff
changeset
|
909 call VerifyScreenDump(buf, 'Test_cursor_position_with_showbreak', {}) |
22cdc06b37bf
patch 8.2.4501: with 'showbreak' set cursor displayed in wrong position
Bram Moolenaar <Bram@vim.org>
parents:
27142
diff
changeset
|
910 |
22cdc06b37bf
patch 8.2.4501: with 'showbreak' set cursor displayed in wrong position
Bram Moolenaar <Bram@vim.org>
parents:
27142
diff
changeset
|
911 call StopVimInTerminal(buf) |
22cdc06b37bf
patch 8.2.4501: with 'showbreak' set cursor displayed in wrong position
Bram Moolenaar <Bram@vim.org>
parents:
27142
diff
changeset
|
912 endfunc |
22cdc06b37bf
patch 8.2.4501: with 'showbreak' set cursor displayed in wrong position
Bram Moolenaar <Bram@vim.org>
parents:
27142
diff
changeset
|
913 |
27128
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
914 func Test_no_spurious_match() |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
915 let s:input = printf('- y %s y %s', repeat('x', 50), repeat('x', 50)) |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
916 call s:test_windows('setl breakindent breakindentopt=list:-1 formatlistpat=^- hls') |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
917 let @/ = '\%>3v[y]' |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
918 redraw! |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
919 call searchcount().total->assert_equal(1) |
29340
fba9e366ced4
patch 9.0.0013: reproducing memory access errors can be difficult
Bram Moolenaar <Bram@vim.org>
parents:
28716
diff
changeset
|
920 |
27128
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
921 " cleanup |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
922 set hls&vim |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
923 bwipeout! |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
924 endfunc |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
925 |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
926 func Test_no_extra_indent() |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
927 call s:test_windows('setl breakindent breakindentopt=list:-1,min:10') |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
928 %d |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
929 let &l:formatlistpat='^\s*\d\+\.\s\+' |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
930 let text = 'word ' |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
931 let len = text->strcharlen() |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
932 let line1 = text->repeat((winwidth(0) / len) * 2) |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
933 let line2 = repeat(' ', 2) .. '1. ' .. line1 |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
934 call setline(1, [line2]) |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
935 redraw! |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
936 " 1) matches formatlist pattern, so indent |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
937 let expect = [ |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
938 \ " 1. word word word ", |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
939 \ " word word word ", |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
940 \ " word word ", |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
941 \ "~ ", |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
942 \ ] |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
943 let lines = s:screen_lines2(1, 4, 20) |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
944 call s:compare_lines(expect, lines) |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
945 " 2) change formatlist pattern |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
946 " -> indent adjusted |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
947 let &l:formatlistpat='^\s*\d\+\.' |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
948 let expect = [ |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
949 \ " 1. word word word ", |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
950 \ " word word word ", |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
951 \ " word word ", |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
952 \ "~ ", |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
953 \ ] |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
954 let lines = s:screen_lines2(1, 4, 20) |
27142
d2471d710ec9
patch 8.2.4100: early return when getting the 'formatlistpat' value
Bram Moolenaar <Bram@vim.org>
parents:
27128
diff
changeset
|
955 " 3) no local formatlist pattern, |
d2471d710ec9
patch 8.2.4100: early return when getting the 'formatlistpat' value
Bram Moolenaar <Bram@vim.org>
parents:
27128
diff
changeset
|
956 " so use global one -> indent |
d2471d710ec9
patch 8.2.4100: early return when getting the 'formatlistpat' value
Bram Moolenaar <Bram@vim.org>
parents:
27128
diff
changeset
|
957 let g_flp = &g:flp |
d2471d710ec9
patch 8.2.4100: early return when getting the 'formatlistpat' value
Bram Moolenaar <Bram@vim.org>
parents:
27128
diff
changeset
|
958 let &g:formatlistpat='^\s*\d\+\.\s\+' |
d2471d710ec9
patch 8.2.4100: early return when getting the 'formatlistpat' value
Bram Moolenaar <Bram@vim.org>
parents:
27128
diff
changeset
|
959 let &l:formatlistpat='' |
d2471d710ec9
patch 8.2.4100: early return when getting the 'formatlistpat' value
Bram Moolenaar <Bram@vim.org>
parents:
27128
diff
changeset
|
960 let expect = [ |
d2471d710ec9
patch 8.2.4100: early return when getting the 'formatlistpat' value
Bram Moolenaar <Bram@vim.org>
parents:
27128
diff
changeset
|
961 \ " 1. word word word ", |
d2471d710ec9
patch 8.2.4100: early return when getting the 'formatlistpat' value
Bram Moolenaar <Bram@vim.org>
parents:
27128
diff
changeset
|
962 \ " word word word ", |
d2471d710ec9
patch 8.2.4100: early return when getting the 'formatlistpat' value
Bram Moolenaar <Bram@vim.org>
parents:
27128
diff
changeset
|
963 \ " word word ", |
d2471d710ec9
patch 8.2.4100: early return when getting the 'formatlistpat' value
Bram Moolenaar <Bram@vim.org>
parents:
27128
diff
changeset
|
964 \ "~ ", |
d2471d710ec9
patch 8.2.4100: early return when getting the 'formatlistpat' value
Bram Moolenaar <Bram@vim.org>
parents:
27128
diff
changeset
|
965 \ ] |
d2471d710ec9
patch 8.2.4100: early return when getting the 'formatlistpat' value
Bram Moolenaar <Bram@vim.org>
parents:
27128
diff
changeset
|
966 let lines = s:screen_lines2(1, 4, 20) |
d2471d710ec9
patch 8.2.4100: early return when getting the 'formatlistpat' value
Bram Moolenaar <Bram@vim.org>
parents:
27128
diff
changeset
|
967 call s:compare_lines(expect, lines) |
d2471d710ec9
patch 8.2.4100: early return when getting the 'formatlistpat' value
Bram Moolenaar <Bram@vim.org>
parents:
27128
diff
changeset
|
968 let &g:flp = g_flp |
d2471d710ec9
patch 8.2.4100: early return when getting the 'formatlistpat' value
Bram Moolenaar <Bram@vim.org>
parents:
27128
diff
changeset
|
969 let &l:formatlistpat='^\s*\d\+\.' |
d2471d710ec9
patch 8.2.4100: early return when getting the 'formatlistpat' value
Bram Moolenaar <Bram@vim.org>
parents:
27128
diff
changeset
|
970 " 4) add something in front, no additional indent |
27128
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
971 norm! gg0 |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
972 exe ":norm! 5iword \<esc>" |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
973 redraw! |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
974 let expect = [ |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
975 \ "word word word word ", |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
976 \ "word 1. word word ", |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
977 \ "word word word word ", |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
978 \ "word word ", |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
979 \ "~ ", |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
980 \ ] |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
981 let lines = s:screen_lines2(1, 5, 20) |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
982 call s:compare_lines(expect, lines) |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
983 bwipeout! |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
984 endfunc |
164d59ddd48a
patch 8.2.4093: cached breakindent values not initialized properly
Bram Moolenaar <Bram@vim.org>
parents:
25723
diff
changeset
|
985 |
28716
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
986 func Test_breakindent_column() |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
987 call s:test_windows('setl breakindent breakindentopt=column:10') |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
988 redraw! |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
989 " 1) default: does not indent, too wide :( |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
990 let expect = [ |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
991 \ " ", |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
992 \ " abcdefghijklmnop", |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
993 \ "qrstuvwxyzABCDEFGHIJ", |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
994 \ "KLMNOP " |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
995 \ ] |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
996 let lines = s:screen_lines2(1, 4, 20) |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
997 call s:compare_lines(expect, lines) |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
998 " 2) lower min value, so that breakindent works |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
999 setl breakindentopt+=min:5 |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
1000 redraw! |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
1001 let expect = [ |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
1002 \ " ", |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
1003 \ " abcdefghijklmnop", |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
1004 \ " qrstuvwxyz", |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
1005 \ " ABCDEFGHIJ", |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
1006 \ " KLMNOP " |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
1007 \ ] |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
1008 let lines = s:screen_lines2(1, 5, 20) |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
1009 " 3) set shift option -> no influence |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
1010 setl breakindentopt+=shift:5 |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
1011 redraw! |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
1012 let expect = [ |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
1013 \ " ", |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
1014 \ " abcdefghijklmnop", |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
1015 \ " qrstuvwxyz", |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
1016 \ " ABCDEFGHIJ", |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
1017 \ " KLMNOP " |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
1018 \ ] |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
1019 let lines = s:screen_lines2(1, 5, 20) |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
1020 call s:compare_lines(expect, lines) |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
1021 " 4) add showbreak value |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
1022 setl showbreak=++ |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
1023 redraw! |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
1024 let expect = [ |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
1025 \ " ", |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
1026 \ " abcdefghijklmnop", |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
1027 \ " ++qrstuvwx", |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
1028 \ " ++yzABCDEF", |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
1029 \ " ++GHIJKLMN", |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
1030 \ " ++OP " |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
1031 \ ] |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
1032 let lines = s:screen_lines2(1, 6, 20) |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
1033 call s:compare_lines(expect, lines) |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
1034 bwipeout! |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
1035 endfunc |
2bd5cb054180
patch 8.2.4882: cannot make 'breakindent' use a specific column
Bram Moolenaar <Bram@vim.org>
parents:
28171
diff
changeset
|
1036 |
31315
6a03cc83fcc5
patch 9.0.0991: crash when reading help index with various options set
Bram Moolenaar <Bram@vim.org>
parents:
30823
diff
changeset
|
1037 func Test_linebreak_list() |
6a03cc83fcc5
patch 9.0.0991: crash when reading help index with various options set
Bram Moolenaar <Bram@vim.org>
parents:
30823
diff
changeset
|
1038 " This was setting wlv.c_extra to NUL while wlv.p_extra is NULL |
6a03cc83fcc5
patch 9.0.0991: crash when reading help index with various options set
Bram Moolenaar <Bram@vim.org>
parents:
30823
diff
changeset
|
1039 filetype plugin on |
6a03cc83fcc5
patch 9.0.0991: crash when reading help index with various options set
Bram Moolenaar <Bram@vim.org>
parents:
30823
diff
changeset
|
1040 syntax enable |
6a03cc83fcc5
patch 9.0.0991: crash when reading help index with various options set
Bram Moolenaar <Bram@vim.org>
parents:
30823
diff
changeset
|
1041 edit! $VIMRUNTIME/doc/index.txt |
6a03cc83fcc5
patch 9.0.0991: crash when reading help index with various options set
Bram Moolenaar <Bram@vim.org>
parents:
30823
diff
changeset
|
1042 /v_P |
6a03cc83fcc5
patch 9.0.0991: crash when reading help index with various options set
Bram Moolenaar <Bram@vim.org>
parents:
30823
diff
changeset
|
1043 |
6a03cc83fcc5
patch 9.0.0991: crash when reading help index with various options set
Bram Moolenaar <Bram@vim.org>
parents:
30823
diff
changeset
|
1044 setlocal list |
6a03cc83fcc5
patch 9.0.0991: crash when reading help index with various options set
Bram Moolenaar <Bram@vim.org>
parents:
30823
diff
changeset
|
1045 setlocal listchars=tab:>- |
6a03cc83fcc5
patch 9.0.0991: crash when reading help index with various options set
Bram Moolenaar <Bram@vim.org>
parents:
30823
diff
changeset
|
1046 setlocal linebreak |
6a03cc83fcc5
patch 9.0.0991: crash when reading help index with various options set
Bram Moolenaar <Bram@vim.org>
parents:
30823
diff
changeset
|
1047 setlocal nowrap |
6a03cc83fcc5
patch 9.0.0991: crash when reading help index with various options set
Bram Moolenaar <Bram@vim.org>
parents:
30823
diff
changeset
|
1048 setlocal filetype=help |
6a03cc83fcc5
patch 9.0.0991: crash when reading help index with various options set
Bram Moolenaar <Bram@vim.org>
parents:
30823
diff
changeset
|
1049 redraw! |
6a03cc83fcc5
patch 9.0.0991: crash when reading help index with various options set
Bram Moolenaar <Bram@vim.org>
parents:
30823
diff
changeset
|
1050 |
6a03cc83fcc5
patch 9.0.0991: crash when reading help index with various options set
Bram Moolenaar <Bram@vim.org>
parents:
30823
diff
changeset
|
1051 bwipe! |
6a03cc83fcc5
patch 9.0.0991: crash when reading help index with various options set
Bram Moolenaar <Bram@vim.org>
parents:
30823
diff
changeset
|
1052 endfunc |
6a03cc83fcc5
patch 9.0.0991: crash when reading help index with various options set
Bram Moolenaar <Bram@vim.org>
parents:
30823
diff
changeset
|
1053 |
6a03cc83fcc5
patch 9.0.0991: crash when reading help index with various options set
Bram Moolenaar <Bram@vim.org>
parents:
30823
diff
changeset
|
1054 |
19783
546bdeef35f1
patch 8.2.0448: various functions not properly tested
Bram Moolenaar <Bram@vim.org>
parents:
19501
diff
changeset
|
1055 " vim: shiftwidth=2 sts=2 expandtab |