annotate src/testdir/test_breakindent.vim @ 19599:5eb0ead1415f v8.2.0356

patch 8.2.0356: MS-Windows: feedkeys() with VIMDLL cannot handle CSI Commit: https://github.com/vim/vim/commit/8f027fe470555252b258508c455e93700a969cb1 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Mar 4 23:21:35 2020 +0100 patch 8.2.0356: MS-Windows: feedkeys() with VIMDLL cannot handle CSI Problem: MS-Windows: feedkeys() with VIMDLL cannot handle CSI correctly. Solution: Modify mch_inchar() to encode CSI bytes. (Ozaki Kiichi, Ken Takata, closes #5726)
author Bram Moolenaar <Bram@vim.org>
date Wed, 04 Mar 2020 23:30:04 +0100
parents f872daa2031b
children 546bdeef35f1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
11
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
12 let s:input ="\tabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOP"
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
13
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
14 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
15 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
16 endfunc
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
17
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
18 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
19 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
20 endfunc
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
21
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
22 func s:test_windows(...)
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
23 call NewWindow(10, 20)
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
24 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
25 put =s:input
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
26 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
27 endfunc
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
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:close_windows(...)
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
30 call CloseWindow()
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
31 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
32 endfunc
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
33
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
34 func Test_breakindent01()
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
35 " simple breakindent test
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
36 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
37 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
38 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
39 \ " abcd",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
40 \ " qrst",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
41 \ " GHIJ",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
42 \ ]
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
43 call s:compare_lines(expect, lines)
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
44 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
45 endfunc
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
46
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
47 func Test_breakindent01_vartabs()
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
48 " like 01 but with vartabs feature
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
49 if !has("vartabs")
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
50 return
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
51 endif
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
52 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
53 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
54 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
55 \ " abcd",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
56 \ " qrst",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
57 \ " GHIJ",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
58 \ ]
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
59 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
60 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
61 endfunc
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
62
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
63 func Test_breakindent02()
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
64 " 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
65 set sbr=>>
8b0114ffde2b patch 8.1.2281: 'showbreak' cannot be set for one window
Bram Moolenaar <Bram@vim.org>
parents: 18502
diff changeset
66 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
67 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
68 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
69 \ " abcd",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
70 \ " >>qr",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
71 \ " >>EF",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
72 \ ]
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
73 call s:compare_lines(expect, lines)
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
74 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
75 endfunc
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
76
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
77 func Test_breakindent02_vartabs()
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
78 if !has("vartabs")
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
79 return
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
80 endif
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
81 " 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
82 call s:test_windows('setl briopt=min:0 sbr=>> vts=4')
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
83 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
84 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
85 \ " abcd",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
86 \ " >>qr",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
87 \ " >>EF",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
88 \ ]
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
89 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
90 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
91 endfunc
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
92
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
93 func Test_breakindent03()
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
94 " 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
95 call s:test_windows('setl briopt=sbr,min:0 sbr=++')
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
96 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
97 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
98 \ " abcd",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
99 \ "++ qrst",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
100 \ "++ GHIJ",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
101 \ ]
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
102 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
103 " clean up
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
104 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
105 endfunc
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
106
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
107 func Test_breakindent03_vartabs()
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
108 " simple breakindent test with showbreak set and briopt including sbr
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
109 if !has("vartabs")
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
110 return
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
111 endif
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
112 call s:test_windows('setl briopt=sbr,min:0 sbr=++ vts=4')
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
113 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
114 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
115 \ " abcd",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
116 \ "++ qrst",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
117 \ "++ GHIJ",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
118 \ ]
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
119 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
120 " clean up
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
121 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
122 endfunc
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
123
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
124 func Test_breakindent04()
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
125 " 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
126 set sbr=<<<
8b0114ffde2b patch 8.1.2281: 'showbreak' cannot be set for one window
Bram Moolenaar <Bram@vim.org>
parents: 18502
diff changeset
127 call s:test_windows('setl sbr=NONE briopt=min:18')
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
128 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
129 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
130 \ " abcd",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
131 \ " qrstuv",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
132 \ " IJKLMN",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
133 \ ]
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
134 call s:compare_lines(expect, lines)
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
135 " clean up
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
136 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
137 set sbr=
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
138 endfunc
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
139
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
140 func Test_breakindent04_vartabs()
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
141 " breakindent set with min width 18
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
142 if !has("vartabs")
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
143 return
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
144 endif
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
145 call s:test_windows('setl sbr= briopt=min:18 vts=4')
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
146 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
147 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
148 \ " abcd",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
149 \ " qrstuv",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
150 \ " IJKLMN",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
151 \ ]
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
152 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
153 " clean up
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
154 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
155 endfunc
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
156
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
157 func Test_breakindent05()
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
158 " 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
159 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
160 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
161 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
162 \ " abcd",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
163 \ " qr",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
164 \ " EF",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
165 \ ]
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
166 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
167 call s:close_windows()
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
168 endfunc
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
169
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
170 func Test_breakindent05_vartabs()
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
171 " 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
172 if !has("vartabs")
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
173 return
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
174 endif
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
175 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
176 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
177 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
178 \ " abcd",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
179 \ " qr",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
180 \ " EF",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
181 \ ]
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
182 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
183 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
184 endfunc
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
185
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
186 func Test_breakindent06()
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
187 " 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
188 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
189 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
190 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
191 \ " abcd",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
192 \ " qrstu",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
193 \ " HIJKL",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
194 \ ]
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
195 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
196 call s:close_windows()
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
197 endfunc
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
198
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
199 func Test_breakindent06_vartabs()
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
200 " 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
201 if !has("vartabs")
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
202 return
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
203 endif
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
204 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
205 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
206 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
207 \ " abcd",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
208 \ " qrstu",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
209 \ " HIJKL",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
210 \ ]
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
211 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
212 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
213 endfunc
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
214
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
215 func Test_breakindent07()
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
216 " 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
217 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
218 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
219 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
220 \ " 2 ab",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
221 \ "? m",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
222 \ "? x",
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 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
225 " clean up
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
226 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
227 endfunc
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
228
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
229 func Test_breakindent07_vartabs()
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
230 if !has("vartabs")
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
231 return
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
232 endif
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
233 " 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
234 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
235 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
236 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
237 \ " 2 ab",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
238 \ "? m",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
239 \ "? x",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
240 \ ]
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
241 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
242 " clean up
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
243 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
244 endfunc
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
245
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
246 func Test_breakindent07a()
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
247 " 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
248 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
249 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
250 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
251 \ " 2 ab",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
252 \ " ? m",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
253 \ " ? x",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
254 \ ]
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
255 call s:compare_lines(expect, lines)
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
256 " clean up
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
257 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
258 endfunc
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
259
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
260 func Test_breakindent07a_vartabs()
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
261 if !has("vartabs")
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
262 return
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
263 endif
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
264 " 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
265 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
266 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
267 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
268 \ " 2 ab",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
269 \ " ? m",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
270 \ " ? x",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
271 \ ]
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
272 call s:compare_lines(expect, lines)
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
273 " clean up
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
274 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
275 endfunc
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
276
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
277 func Test_breakindent08()
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
278 " 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
279 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
280 " make sure, cache is invalidated!
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
281 set ts=8
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
282 redraw!
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
283 set ts=4
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
284 redraw!
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
285 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
286 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
287 \ " 2 ^Iabcd",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
288 \ "# opq",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
289 \ "# BCD",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
290 \ ]
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
291 call s:compare_lines(expect, lines)
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
292 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
293 endfunc
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
294
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
295 func Test_breakindent08_vartabs()
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
296 if !has("vartabs")
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
297 return
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
298 endif
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
299 " 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
300 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
301 " 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
302 set ts=8
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
303 redraw!
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
304 set ts=4
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
305 redraw!
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
306 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
307 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
308 \ " 2 ^Iabcd",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
309 \ "# opq",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
310 \ "# BCD",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
311 \ ]
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
312 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
313 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
314 endfunc
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
315
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
316 func Test_breakindent08a()
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
317 " 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
318 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
319 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
320 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
321 \ " 2 ^Iabcd",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
322 \ " # opq",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
323 \ " # BCD",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
324 \ ]
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
325 call s:compare_lines(expect, lines)
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
326 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
327 endfunc
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
328
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
329 func Test_breakindent08a_vartabs()
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
330 if !has("vartabs")
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
331 return
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
332 endif
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
333 " 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
334 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
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 \ " # opq",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
339 \ " # BCD",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
340 \ ]
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
341 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
342 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
343 endfunc
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
344
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
345 func Test_breakindent09()
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
346 " 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
347 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
348 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
349 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
350 \ " 2 ^Iabcd",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
351 \ " #op",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
352 \ " #AB",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
353 \ ]
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
354 call s:compare_lines(expect, lines)
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
355 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
356 endfunc
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
357
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
358 func Test_breakindent09_vartabs()
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
359 if !has("vartabs")
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
360 return
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
361 endif
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
362 " 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
363 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
364 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
365 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
366 \ " 2 ^Iabcd",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
367 \ " #op",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
368 \ " #AB",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
369 \ ]
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
370 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
371 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
372 endfunc
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
373
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
374 func Test_breakindent10()
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
375 " 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
376 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
377 " make sure, cache is invalidated!
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
378 set ts=8
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
379 redraw!
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
380 set ts=4
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
381 redraw!
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
382 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
383 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
384 \ " 2 ab",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
385 \ "~ mn",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
386 \ "~ yz",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
387 \ ]
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
388 call s:compare_lines(expect, lines)
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
389 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
390 endfunc
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
391
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
392 func Test_breakindent10_vartabs()
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
393 if !has("vartabs")
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
394 return
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
395 endif
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
396 " 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
397 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
398 " 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
399 set ts=8
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
400 redraw!
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
401 set ts=4
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
402 redraw!
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
403 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
404 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
405 \ " 2 ab",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
406 \ "~ mn",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
407 \ "~ yz",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
408 \ ]
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
409 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
410 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
411 endfunc
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
412
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
413 func Test_breakindent11()
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
414 " test strdisplaywidth()
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
415 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
416 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
417 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
418 call assert_equal(width, strdisplaywidth(text))
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
419 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
420 endfunc
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
421
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
422 func Test_breakindent11_vartabs()
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
423 if !has("vartabs")
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
424 return
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
425 endif
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
426 " test strdisplaywidth()
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
427 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
428 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
429 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
430 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
431 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
432 endfunc
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
433
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
434 func Test_breakindent12()
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
435 " 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
436 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
437 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
438 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
439 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
440 \ " 2 >--->--->--->",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
441 \ " ---{ ",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
442 \ "~ ",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
443 \ ]
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
444 call s:compare_lines(expect, lines)
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
445 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
446 endfunc
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
447
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
448 func Test_breakindent12_vartabs()
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
449 if !has("vartabs")
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
450 return
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
451 endif
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
452 " 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
453 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
454 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
455 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
456 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
457 \ " 2 >--->--->--->",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
458 \ " ---{ ",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
459 \ "~ ",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
460 \ ]
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
461 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
462 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
463 endfunc
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
464
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
465 func Test_breakindent13()
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
466 let s:input = ""
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
467 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
468 vert resize 20
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
469 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
470 1
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
471 norm! fbgj"ayl
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
472 2
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
473 norm! fygj"byl
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
474 call assert_equal('d', @a)
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
475 call assert_equal('w', @b)
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
476 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
477 endfunc
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
478
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
479 func Test_breakindent13_vartabs()
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
480 if !has("vartabs")
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
481 return
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
482 endif
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
483 let s:input = ""
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
484 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
485 vert resize 20
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
486 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
487 1
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
488 norm! fbgj"ayl
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
489 2
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
490 norm! fygj"byl
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
491 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
492 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
493 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
494 endfunc
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
495
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
496 func Test_breakindent14()
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
497 let s:input = ""
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
498 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
499 vert resize 30
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
500 norm! 3a1234567890
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
501 norm! a abcde
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
502 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
503 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
504 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
505 \ "e ",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
506 \ "~ ",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
507 \ "~ ",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
508 \ ]
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
509 call s:compare_lines(expect, lines)
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
510 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
511 endfunc
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
512
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
513 func Test_breakindent14_vartabs()
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
514 if !has("vartabs")
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
515 return
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
516 endif
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
517 let s:input = ""
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
518 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
519 vert resize 30
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
520 norm! 3a1234567890
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
521 norm! a abcde
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
522 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
523 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
524 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
525 \ "e ",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
526 \ "~ ",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
527 \ "~ ",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
528 \ ]
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
529 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
530 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
531 endfunc
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
532
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
533 func Test_breakindent15()
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
534 let s:input = ""
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
535 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
536 vert resize 30
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
537 norm! 4a1234567890
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
538 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
539 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
540 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
541 \ " 1234567890 ",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
542 \ "~ ",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
543 \ "~ ",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
544 \ ]
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
545 call s:compare_lines(expect, lines)
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
546 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
547 endfunc
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
548
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
549 func Test_breakindent15_vartabs()
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
550 if !has("vartabs")
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
551 return
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
552 endif
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
553 let s:input = ""
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
554 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
555 vert resize 30
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
556 norm! 4a1234567890
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
557 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
558 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
559 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
560 \ " 1234567890 ",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
561 \ "~ ",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
562 \ "~ ",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
563 \ ]
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
564 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
565 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
566 endfunc
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
567
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
568 func Test_breakindent16()
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
569 " 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
570 let s:input = ""
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
571 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
572 call setline(1, "\t".repeat("1234567890", 10))
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
573 resize 6
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
574 norm! 1gg$
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
575 redraw!
14175
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 = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
578 \ " 789012",
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 \ ]
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
582 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
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 \ ]
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
589 call s:compare_lines(expect, lines)
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
590 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
591 endfunc
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
592
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
593 func Test_breakindent16_vartabs()
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
594 if !has("vartabs")
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
595 return
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
596 endif
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
597 " 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
598 let s:input = ""
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
599 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
600 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
601 resize 6
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
602 norm! 1gg$
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
603 redraw!
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
604 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
605 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
606 \ " 789012",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
607 \ " 345678",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
608 \ " 901234",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
609 \ ]
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
610 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
611 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
612 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
613 \ " 567890",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
614 \ " 123456",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
615 \ " 7890 ",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
616 \ ]
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
617 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
618 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
619 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
620
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
621 func Test_breakindent17_vartabs()
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
622 if !has("vartabs")
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
623 return
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
624 endif
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
625 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
626 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
627 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
628 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
629 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
630 redraw!
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
631 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
632 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
633 \ "<-->aaaaaaaaaaaaaaaaaaaaaaaaaa",
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
634 \ " +++aaaaaaaaaaaaaaaaaaaaaaa",
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
635 \ " +++aaaaaaaaaaaaaa ",
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
636 \ ]
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
637 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
638 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
639 endfunc
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
640
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
641 func Test_breakindent18_vartabs()
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
642 if !has("vartabs")
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
643 return
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
644 endif
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
645 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
646 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
647 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
648 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
649 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
650 redraw!
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
651 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
652 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
653 \ "<-->aaaaaaaaaaaaaaaaaaaaaaaaaa",
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
654 \ " aaaaaaaaaaaaaaaaaaaaaaaaaa",
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
655 \ " aaaaaaaaaaa ",
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
656 \ ]
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
657 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
658 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
659 endfunc
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
660
19174
d5b793803236 patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents: 18574
diff changeset
661 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
662 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
663 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
664 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
665 norm! 1gg
d5b793803236 patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents: 18574
diff changeset
666 redraw!
d5b793803236 patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents: 18574
diff changeset
667 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
668 let expect = [
d5b793803236 patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents: 18574
diff changeset
669 \ "aaaaaaaaaaaaaaaaaaaa",
d5b793803236 patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents: 18574
diff changeset
670 \ "> aaaaaaaaaaaaaaaaaa",
d5b793803236 patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents: 18574
diff changeset
671 \ "> aaaaaaaaaaaaaaaaaa",
d5b793803236 patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents: 18574
diff changeset
672 \ ]
d5b793803236 patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents: 18574
diff changeset
673 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
674 " 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
675 setl scrolloff=5
d5b793803236 patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents: 18574
diff changeset
676 norm! 5gj
d5b793803236 patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents: 18574
diff changeset
677 redraw!
d5b793803236 patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents: 18574
diff changeset
678 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
679 let expect = [
d5b793803236 patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents: 18574
diff changeset
680 \ "> aaaaaaaaaaaaaaaaaa",
d5b793803236 patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents: 18574
diff changeset
681 \ "> aaaaaaaaaaaaaaaaaa",
d5b793803236 patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents: 18574
diff changeset
682 \ "> aaaaaaaaaaaaaaaaaa",
d5b793803236 patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents: 18574
diff changeset
683 \ ]
d5b793803236 patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents: 18574
diff changeset
684 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
685
f872daa2031b patch 8.2.0308: 'showbreak' does not work for a very long line
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
686 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
687 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
688 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
689 let expect = [
f872daa2031b patch 8.2.0308: 'showbreak' does not work for a very long line
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
690 \ ">aaaaaaaaaaaaaaaaaaa",
f872daa2031b patch 8.2.0308: 'showbreak' does not work for a very long line
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
691 \ ">aaaaaaaaaaaaaaaaaaa",
f872daa2031b patch 8.2.0308: 'showbreak' does not work for a very long line
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
692 \ ">aaaaaaaaaaaaaaaaaaa",
f872daa2031b patch 8.2.0308: 'showbreak' does not work for a very long line
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
693 \ ]
f872daa2031b patch 8.2.0308: 'showbreak' does not work for a very long line
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
694 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
695 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
696 endfunc