annotate src/testdir/test_display.vim @ 30379:25e3121ed316 v9.0.0525

patch 9.0.0525: manually deleting temp test files Commit: https://github.com/vim/vim/commit/5917341f65d4fc669b9d15343ccdb00c160201da Author: Bram Moolenaar <Bram@vim.org> Date: Tue Sep 20 22:01:33 2022 +0100 patch 9.0.0525: manually deleting temp test files Problem: Manually deleting temp test files. Solution: Add the 'D' flag to writefile().
author Bram Moolenaar <Bram@vim.org>
date Tue, 20 Sep 2022 23:15:04 +0200
parents 9dce192d1ac2
children 218363931f5d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10466
34b50194f82d commit https://github.com/vim/vim/commit/6270660611a151c5d0f614a5f0248ccdc80ed971
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1 " Test for displaying stuff
21765
08940efa6b4e patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents: 21590
diff changeset
2
10466
34b50194f82d commit https://github.com/vim/vim/commit/6270660611a151c5d0f614a5f0248ccdc80ed971
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
3 if !has('gui_running') && has('unix')
34b50194f82d commit https://github.com/vim/vim/commit/6270660611a151c5d0f614a5f0248ccdc80ed971
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
4 set term=ansi
34b50194f82d commit https://github.com/vim/vim/commit/6270660611a151c5d0f614a5f0248ccdc80ed971
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
5 endif
34b50194f82d commit https://github.com/vim/vim/commit/6270660611a151c5d0f614a5f0248ccdc80ed971
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
6
11265
b25895ab67be patch 8.0.0518: bad fold text when a multi-byte char has a zero byte
Christian Brabandt <cb@256bit.org>
parents: 10470
diff changeset
7 source view_util.vim
17614
d7708560b77c patch 8.1.1804: no test for display updating without a scroll region
Bram Moolenaar <Bram@vim.org>
parents: 15607
diff changeset
8 source check.vim
d7708560b77c patch 8.1.1804: no test for display updating without a scroll region
Bram Moolenaar <Bram@vim.org>
parents: 15607
diff changeset
9 source screendump.vim
10466
34b50194f82d commit https://github.com/vim/vim/commit/6270660611a151c5d0f614a5f0248ccdc80ed971
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
10
15406
63b02fcf1361 patch 8.1.0711: test files still use function!
Bram Moolenaar <Bram@vim.org>
parents: 11277
diff changeset
11 func Test_display_foldcolumn()
17614
d7708560b77c patch 8.1.1804: no test for display updating without a scroll region
Bram Moolenaar <Bram@vim.org>
parents: 15607
diff changeset
12 CheckFeature folding
d7708560b77c patch 8.1.1804: no test for display updating without a scroll region
Bram Moolenaar <Bram@vim.org>
parents: 15607
diff changeset
13
10466
34b50194f82d commit https://github.com/vim/vim/commit/6270660611a151c5d0f614a5f0248ccdc80ed971
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
14 new
34b50194f82d commit https://github.com/vim/vim/commit/6270660611a151c5d0f614a5f0248ccdc80ed971
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
15 vnew
34b50194f82d commit https://github.com/vim/vim/commit/6270660611a151c5d0f614a5f0248ccdc80ed971
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
16 vert resize 25
10470
232a0d1d8f24 commit https://github.com/vim/vim/commit/7089237885218eb8a19805bc2b75481c4efcd6ba
Christian Brabandt <cb@256bit.org>
parents: 10466
diff changeset
17 call assert_equal(25, winwidth(winnr()))
232a0d1d8f24 commit https://github.com/vim/vim/commit/7089237885218eb8a19805bc2b75481c4efcd6ba
Christian Brabandt <cb@256bit.org>
parents: 10466
diff changeset
18 set isprint=@
10466
34b50194f82d commit https://github.com/vim/vim/commit/6270660611a151c5d0f614a5f0248ccdc80ed971
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
19
34b50194f82d commit https://github.com/vim/vim/commit/6270660611a151c5d0f614a5f0248ccdc80ed971
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
20 1put='e more noise blah blah‚ more stuff here'
34b50194f82d commit https://github.com/vim/vim/commit/6270660611a151c5d0f614a5f0248ccdc80ed971
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
21
11265
b25895ab67be patch 8.0.0518: bad fold text when a multi-byte char has a zero byte
Christian Brabandt <cb@256bit.org>
parents: 10470
diff changeset
22 let expect = [
b25895ab67be patch 8.0.0518: bad fold text when a multi-byte char has a zero byte
Christian Brabandt <cb@256bit.org>
parents: 10470
diff changeset
23 \ "e more noise blah blah<82",
b25895ab67be patch 8.0.0518: bad fold text when a multi-byte char has a zero byte
Christian Brabandt <cb@256bit.org>
parents: 10470
diff changeset
24 \ "> more stuff here "
b25895ab67be patch 8.0.0518: bad fold text when a multi-byte char has a zero byte
Christian Brabandt <cb@256bit.org>
parents: 10470
diff changeset
25 \ ]
10466
34b50194f82d commit https://github.com/vim/vim/commit/6270660611a151c5d0f614a5f0248ccdc80ed971
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
26
34b50194f82d commit https://github.com/vim/vim/commit/6270660611a151c5d0f614a5f0248ccdc80ed971
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
27 call cursor(2, 1)
34b50194f82d commit https://github.com/vim/vim/commit/6270660611a151c5d0f614a5f0248ccdc80ed971
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
28 norm! zt
17614
d7708560b77c patch 8.1.1804: no test for display updating without a scroll region
Bram Moolenaar <Bram@vim.org>
parents: 15607
diff changeset
29 let lines = ScreenLines([1,2], winwidth(0))
11265
b25895ab67be patch 8.0.0518: bad fold text when a multi-byte char has a zero byte
Christian Brabandt <cb@256bit.org>
parents: 10470
diff changeset
30 call assert_equal(expect, lines)
10466
34b50194f82d commit https://github.com/vim/vim/commit/6270660611a151c5d0f614a5f0248ccdc80ed971
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
31 set fdc=2
17614
d7708560b77c patch 8.1.1804: no test for display updating without a scroll region
Bram Moolenaar <Bram@vim.org>
parents: 15607
diff changeset
32 let lines = ScreenLines([1,2], winwidth(0))
11265
b25895ab67be patch 8.0.0518: bad fold text when a multi-byte char has a zero byte
Christian Brabandt <cb@256bit.org>
parents: 10470
diff changeset
33 let expect = [
b25895ab67be patch 8.0.0518: bad fold text when a multi-byte char has a zero byte
Christian Brabandt <cb@256bit.org>
parents: 10470
diff changeset
34 \ " e more noise blah blah<",
b25895ab67be patch 8.0.0518: bad fold text when a multi-byte char has a zero byte
Christian Brabandt <cb@256bit.org>
parents: 10470
diff changeset
35 \ " 82> more stuff here "
b25895ab67be patch 8.0.0518: bad fold text when a multi-byte char has a zero byte
Christian Brabandt <cb@256bit.org>
parents: 10470
diff changeset
36 \ ]
b25895ab67be patch 8.0.0518: bad fold text when a multi-byte char has a zero byte
Christian Brabandt <cb@256bit.org>
parents: 10470
diff changeset
37 call assert_equal(expect, lines)
10466
34b50194f82d commit https://github.com/vim/vim/commit/6270660611a151c5d0f614a5f0248ccdc80ed971
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
38
34b50194f82d commit https://github.com/vim/vim/commit/6270660611a151c5d0f614a5f0248ccdc80ed971
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
39 quit!
34b50194f82d commit https://github.com/vim/vim/commit/6270660611a151c5d0f614a5f0248ccdc80ed971
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
40 quit!
11265
b25895ab67be patch 8.0.0518: bad fold text when a multi-byte char has a zero byte
Christian Brabandt <cb@256bit.org>
parents: 10470
diff changeset
41 endfunc
b25895ab67be patch 8.0.0518: bad fold text when a multi-byte char has a zero byte
Christian Brabandt <cb@256bit.org>
parents: 10470
diff changeset
42
15406
63b02fcf1361 patch 8.1.0711: test files still use function!
Bram Moolenaar <Bram@vim.org>
parents: 11277
diff changeset
43 func Test_display_foldtext_mbyte()
17614
d7708560b77c patch 8.1.1804: no test for display updating without a scroll region
Bram Moolenaar <Bram@vim.org>
parents: 15607
diff changeset
44 CheckFeature folding
d7708560b77c patch 8.1.1804: no test for display updating without a scroll region
Bram Moolenaar <Bram@vim.org>
parents: 15607
diff changeset
45
11265
b25895ab67be patch 8.0.0518: bad fold text when a multi-byte char has a zero byte
Christian Brabandt <cb@256bit.org>
parents: 10470
diff changeset
46 call NewWindow(10, 40)
b25895ab67be patch 8.0.0518: bad fold text when a multi-byte char has a zero byte
Christian Brabandt <cb@256bit.org>
parents: 10470
diff changeset
47 call append(0, range(1,20))
b25895ab67be patch 8.0.0518: bad fold text when a multi-byte char has a zero byte
Christian Brabandt <cb@256bit.org>
parents: 10470
diff changeset
48 exe "set foldmethod=manual foldtext=foldtext() fillchars=fold:\u2500,vert:\u2502 fdc=2"
b25895ab67be patch 8.0.0518: bad fold text when a multi-byte char has a zero byte
Christian Brabandt <cb@256bit.org>
parents: 10470
diff changeset
49 call cursor(2, 1)
b25895ab67be patch 8.0.0518: bad fold text when a multi-byte char has a zero byte
Christian Brabandt <cb@256bit.org>
parents: 10470
diff changeset
50 norm! zf13G
b25895ab67be patch 8.0.0518: bad fold text when a multi-byte char has a zero byte
Christian Brabandt <cb@256bit.org>
parents: 10470
diff changeset
51 let lines=ScreenLines([1,3], winwidth(0)+1)
b25895ab67be patch 8.0.0518: bad fold text when a multi-byte char has a zero byte
Christian Brabandt <cb@256bit.org>
parents: 10470
diff changeset
52 let expect=[
b25895ab67be patch 8.0.0518: bad fold text when a multi-byte char has a zero byte
Christian Brabandt <cb@256bit.org>
parents: 10470
diff changeset
53 \ " 1 \u2502",
b25895ab67be patch 8.0.0518: bad fold text when a multi-byte char has a zero byte
Christian Brabandt <cb@256bit.org>
parents: 10470
diff changeset
54 \ "+ +-- 12 lines: 2". repeat("\u2500", 23). "\u2502",
b25895ab67be patch 8.0.0518: bad fold text when a multi-byte char has a zero byte
Christian Brabandt <cb@256bit.org>
parents: 10470
diff changeset
55 \ " 14 \u2502",
b25895ab67be patch 8.0.0518: bad fold text when a multi-byte char has a zero byte
Christian Brabandt <cb@256bit.org>
parents: 10470
diff changeset
56 \ ]
b25895ab67be patch 8.0.0518: bad fold text when a multi-byte char has a zero byte
Christian Brabandt <cb@256bit.org>
parents: 10470
diff changeset
57 call assert_equal(expect, lines)
11277
f26a535d9464 patch 8.0.0524: folds messed up
Christian Brabandt <cb@256bit.org>
parents: 11265
diff changeset
58
f26a535d9464 patch 8.0.0524: folds messed up
Christian Brabandt <cb@256bit.org>
parents: 11265
diff changeset
59 set fillchars=fold:-,vert:\|
f26a535d9464 patch 8.0.0524: folds messed up
Christian Brabandt <cb@256bit.org>
parents: 11265
diff changeset
60 let lines=ScreenLines([1,3], winwidth(0)+1)
f26a535d9464 patch 8.0.0524: folds messed up
Christian Brabandt <cb@256bit.org>
parents: 11265
diff changeset
61 let expect=[
f26a535d9464 patch 8.0.0524: folds messed up
Christian Brabandt <cb@256bit.org>
parents: 11265
diff changeset
62 \ " 1 |",
f26a535d9464 patch 8.0.0524: folds messed up
Christian Brabandt <cb@256bit.org>
parents: 11265
diff changeset
63 \ "+ +-- 12 lines: 2". repeat("-", 23). "|",
f26a535d9464 patch 8.0.0524: folds messed up
Christian Brabandt <cb@256bit.org>
parents: 11265
diff changeset
64 \ " 14 |",
f26a535d9464 patch 8.0.0524: folds messed up
Christian Brabandt <cb@256bit.org>
parents: 11265
diff changeset
65 \ ]
f26a535d9464 patch 8.0.0524: folds messed up
Christian Brabandt <cb@256bit.org>
parents: 11265
diff changeset
66 call assert_equal(expect, lines)
f26a535d9464 patch 8.0.0524: folds messed up
Christian Brabandt <cb@256bit.org>
parents: 11265
diff changeset
67
11265
b25895ab67be patch 8.0.0518: bad fold text when a multi-byte char has a zero byte
Christian Brabandt <cb@256bit.org>
parents: 10470
diff changeset
68 set foldtext& fillchars& foldmethod& fdc&
b25895ab67be patch 8.0.0518: bad fold text when a multi-byte char has a zero byte
Christian Brabandt <cb@256bit.org>
parents: 10470
diff changeset
69 bw!
b25895ab67be patch 8.0.0518: bad fold text when a multi-byte char has a zero byte
Christian Brabandt <cb@256bit.org>
parents: 10470
diff changeset
70 endfunc
17614
d7708560b77c patch 8.1.1804: no test for display updating without a scroll region
Bram Moolenaar <Bram@vim.org>
parents: 15607
diff changeset
71
d7708560b77c patch 8.1.1804: no test for display updating without a scroll region
Bram Moolenaar <Bram@vim.org>
parents: 15607
diff changeset
72 " check that win_ins_lines() and win_del_lines() work when t_cs is empty.
d7708560b77c patch 8.1.1804: no test for display updating without a scroll region
Bram Moolenaar <Bram@vim.org>
parents: 15607
diff changeset
73 func Test_scroll_without_region()
d7708560b77c patch 8.1.1804: no test for display updating without a scroll region
Bram Moolenaar <Bram@vim.org>
parents: 15607
diff changeset
74 CheckScreendump
d7708560b77c patch 8.1.1804: no test for display updating without a scroll region
Bram Moolenaar <Bram@vim.org>
parents: 15607
diff changeset
75
d7708560b77c patch 8.1.1804: no test for display updating without a scroll region
Bram Moolenaar <Bram@vim.org>
parents: 15607
diff changeset
76 let lines =<< trim END
d7708560b77c patch 8.1.1804: no test for display updating without a scroll region
Bram Moolenaar <Bram@vim.org>
parents: 15607
diff changeset
77 call setline(1, range(1, 20))
d7708560b77c patch 8.1.1804: no test for display updating without a scroll region
Bram Moolenaar <Bram@vim.org>
parents: 15607
diff changeset
78 set t_cs=
d7708560b77c patch 8.1.1804: no test for display updating without a scroll region
Bram Moolenaar <Bram@vim.org>
parents: 15607
diff changeset
79 set laststatus=2
d7708560b77c patch 8.1.1804: no test for display updating without a scroll region
Bram Moolenaar <Bram@vim.org>
parents: 15607
diff changeset
80 END
30379
25e3121ed316 patch 9.0.0525: manually deleting temp test files
Bram Moolenaar <Bram@vim.org>
parents: 29387
diff changeset
81 call writefile(lines, 'Xtestscroll', 'D')
17614
d7708560b77c patch 8.1.1804: no test for display updating without a scroll region
Bram Moolenaar <Bram@vim.org>
parents: 15607
diff changeset
82 let buf = RunVimInTerminal('-S Xtestscroll', #{rows: 10})
d7708560b77c patch 8.1.1804: no test for display updating without a scroll region
Bram Moolenaar <Bram@vim.org>
parents: 15607
diff changeset
83
d7708560b77c patch 8.1.1804: no test for display updating without a scroll region
Bram Moolenaar <Bram@vim.org>
parents: 15607
diff changeset
84 call VerifyScreenDump(buf, 'Test_scroll_no_region_1', {})
d7708560b77c patch 8.1.1804: no test for display updating without a scroll region
Bram Moolenaar <Bram@vim.org>
parents: 15607
diff changeset
85
d7708560b77c patch 8.1.1804: no test for display updating without a scroll region
Bram Moolenaar <Bram@vim.org>
parents: 15607
diff changeset
86 call term_sendkeys(buf, ":3delete\<cr>")
d7708560b77c patch 8.1.1804: no test for display updating without a scroll region
Bram Moolenaar <Bram@vim.org>
parents: 15607
diff changeset
87 call VerifyScreenDump(buf, 'Test_scroll_no_region_2', {})
d7708560b77c patch 8.1.1804: no test for display updating without a scroll region
Bram Moolenaar <Bram@vim.org>
parents: 15607
diff changeset
88
d7708560b77c patch 8.1.1804: no test for display updating without a scroll region
Bram Moolenaar <Bram@vim.org>
parents: 15607
diff changeset
89 call term_sendkeys(buf, ":4put\<cr>")
d7708560b77c patch 8.1.1804: no test for display updating without a scroll region
Bram Moolenaar <Bram@vim.org>
parents: 15607
diff changeset
90 call VerifyScreenDump(buf, 'Test_scroll_no_region_3', {})
d7708560b77c patch 8.1.1804: no test for display updating without a scroll region
Bram Moolenaar <Bram@vim.org>
parents: 15607
diff changeset
91
17618
9695e9fed059 patch 8.1.1806: test for display updating doesn't check without statusline
Bram Moolenaar <Bram@vim.org>
parents: 17614
diff changeset
92 call term_sendkeys(buf, ":undo\<cr>")
9695e9fed059 patch 8.1.1806: test for display updating doesn't check without statusline
Bram Moolenaar <Bram@vim.org>
parents: 17614
diff changeset
93 call term_sendkeys(buf, ":undo\<cr>")
9695e9fed059 patch 8.1.1806: test for display updating doesn't check without statusline
Bram Moolenaar <Bram@vim.org>
parents: 17614
diff changeset
94 call term_sendkeys(buf, ":set laststatus=0\<cr>")
9695e9fed059 patch 8.1.1806: test for display updating doesn't check without statusline
Bram Moolenaar <Bram@vim.org>
parents: 17614
diff changeset
95 call VerifyScreenDump(buf, 'Test_scroll_no_region_4', {})
9695e9fed059 patch 8.1.1806: test for display updating doesn't check without statusline
Bram Moolenaar <Bram@vim.org>
parents: 17614
diff changeset
96
9695e9fed059 patch 8.1.1806: test for display updating doesn't check without statusline
Bram Moolenaar <Bram@vim.org>
parents: 17614
diff changeset
97 call term_sendkeys(buf, ":3delete\<cr>")
9695e9fed059 patch 8.1.1806: test for display updating doesn't check without statusline
Bram Moolenaar <Bram@vim.org>
parents: 17614
diff changeset
98 call VerifyScreenDump(buf, 'Test_scroll_no_region_5', {})
9695e9fed059 patch 8.1.1806: test for display updating doesn't check without statusline
Bram Moolenaar <Bram@vim.org>
parents: 17614
diff changeset
99
9695e9fed059 patch 8.1.1806: test for display updating doesn't check without statusline
Bram Moolenaar <Bram@vim.org>
parents: 17614
diff changeset
100 call term_sendkeys(buf, ":4put\<cr>")
9695e9fed059 patch 8.1.1806: test for display updating doesn't check without statusline
Bram Moolenaar <Bram@vim.org>
parents: 17614
diff changeset
101 call VerifyScreenDump(buf, 'Test_scroll_no_region_6', {})
9695e9fed059 patch 8.1.1806: test for display updating doesn't check without statusline
Bram Moolenaar <Bram@vim.org>
parents: 17614
diff changeset
102
17614
d7708560b77c patch 8.1.1804: no test for display updating without a scroll region
Bram Moolenaar <Bram@vim.org>
parents: 15607
diff changeset
103 " clean up
d7708560b77c patch 8.1.1804: no test for display updating without a scroll region
Bram Moolenaar <Bram@vim.org>
parents: 15607
diff changeset
104 call StopVimInTerminal(buf)
d7708560b77c patch 8.1.1804: no test for display updating without a scroll region
Bram Moolenaar <Bram@vim.org>
parents: 15607
diff changeset
105 endfunc
18131
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
106
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
107 func Test_display_listchars_precedes()
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
108 call NewWindow(10, 10)
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
109 " Need a physical line that wraps over the complete
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
110 " window size
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
111 call append(0, repeat('aaa aaa aa ', 10))
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
112 call append(1, repeat(['bbb bbb bbb bbb'], 2))
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
113 " remove blank trailing line
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
114 $d
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
115 set list nowrap
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
116 call cursor(1, 1)
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
117 " move to end of line and scroll 2 characters back
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
118 norm! $2zh
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
119 let lines=ScreenLines([1,4], winwidth(0)+1)
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
120 let expect = [
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
121 \ " aaa aa $ |",
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
122 \ "$ |",
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
123 \ "$ |",
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
124 \ "~ |",
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
125 \ ]
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
126 call assert_equal(expect, lines)
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
127 set list listchars+=precedes:< nowrap
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
128 call cursor(1, 1)
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
129 " move to end of line and scroll 2 characters back
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
130 norm! $2zh
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
131 let lines = ScreenLines([1,4], winwidth(0)+1)
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
132 let expect = [
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
133 \ "<aaa aa $ |",
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
134 \ "< |",
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
135 \ "< |",
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
136 \ "~ |",
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
137 \ ]
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
138 call assert_equal(expect, lines)
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
139 set wrap
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
140 call cursor(1, 1)
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
141 " the complete line should be displayed in the window
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
142 norm! $
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
143
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
144 let lines = ScreenLines([1,10], winwidth(0)+1)
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
145 let expect = [
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
146 \ "<aaa aaa a|",
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
147 \ "a aaa aaa |",
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
148 \ "aa aaa aaa|",
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
149 \ " aa aaa aa|",
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
150 \ "a aa aaa a|",
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
151 \ "aa aa aaa |",
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
152 \ "aaa aa aaa|",
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
153 \ " aaa aa aa|",
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
154 \ "a aaa aa a|",
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
155 \ "aa aaa aa |",
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
156 \ ]
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
157 call assert_equal(expect, lines)
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
158 set list& listchars& wrap&
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
159 bw!
851a014dfd8b patch 8.1.2060: "precedes" in 'listchars' not used properly
Bram Moolenaar <Bram@vim.org>
parents: 17618
diff changeset
160 endfunc
18424
956a9bc4e25a patch 8.1.2206: no test for fixed issue #3893
Bram Moolenaar <Bram@vim.org>
parents: 18131
diff changeset
161
956a9bc4e25a patch 8.1.2206: no test for fixed issue #3893
Bram Moolenaar <Bram@vim.org>
parents: 18131
diff changeset
162 " Check that win_lines() works correctly with the number_only parameter=TRUE
956a9bc4e25a patch 8.1.2206: no test for fixed issue #3893
Bram Moolenaar <Bram@vim.org>
parents: 18131
diff changeset
163 " should break early to optimize cost of drawing, but needs to make sure
956a9bc4e25a patch 8.1.2206: no test for fixed issue #3893
Bram Moolenaar <Bram@vim.org>
parents: 18131
diff changeset
164 " that the number column is correctly highlighted.
956a9bc4e25a patch 8.1.2206: no test for fixed issue #3893
Bram Moolenaar <Bram@vim.org>
parents: 18131
diff changeset
165 func Test_scroll_CursorLineNr_update()
956a9bc4e25a patch 8.1.2206: no test for fixed issue #3893
Bram Moolenaar <Bram@vim.org>
parents: 18131
diff changeset
166 CheckScreendump
956a9bc4e25a patch 8.1.2206: no test for fixed issue #3893
Bram Moolenaar <Bram@vim.org>
parents: 18131
diff changeset
167
956a9bc4e25a patch 8.1.2206: no test for fixed issue #3893
Bram Moolenaar <Bram@vim.org>
parents: 18131
diff changeset
168 let lines =<< trim END
956a9bc4e25a patch 8.1.2206: no test for fixed issue #3893
Bram Moolenaar <Bram@vim.org>
parents: 18131
diff changeset
169 hi CursorLineNr ctermfg=73 ctermbg=236
956a9bc4e25a patch 8.1.2206: no test for fixed issue #3893
Bram Moolenaar <Bram@vim.org>
parents: 18131
diff changeset
170 set nu rnu cursorline cursorlineopt=number
956a9bc4e25a patch 8.1.2206: no test for fixed issue #3893
Bram Moolenaar <Bram@vim.org>
parents: 18131
diff changeset
171 exe ":norm! o\<esc>110ia\<esc>"
956a9bc4e25a patch 8.1.2206: no test for fixed issue #3893
Bram Moolenaar <Bram@vim.org>
parents: 18131
diff changeset
172 END
956a9bc4e25a patch 8.1.2206: no test for fixed issue #3893
Bram Moolenaar <Bram@vim.org>
parents: 18131
diff changeset
173 let filename = 'Xdrawscreen'
30379
25e3121ed316 patch 9.0.0525: manually deleting temp test files
Bram Moolenaar <Bram@vim.org>
parents: 29387
diff changeset
174 call writefile(lines, filename, 'D')
18424
956a9bc4e25a patch 8.1.2206: no test for fixed issue #3893
Bram Moolenaar <Bram@vim.org>
parents: 18131
diff changeset
175 let buf = RunVimInTerminal('-S '.filename, #{rows: 5, cols: 50})
956a9bc4e25a patch 8.1.2206: no test for fixed issue #3893
Bram Moolenaar <Bram@vim.org>
parents: 18131
diff changeset
176 call term_sendkeys(buf, "k")
956a9bc4e25a patch 8.1.2206: no test for fixed issue #3893
Bram Moolenaar <Bram@vim.org>
parents: 18131
diff changeset
177 call VerifyScreenDump(buf, 'Test_winline_rnu', {})
956a9bc4e25a patch 8.1.2206: no test for fixed issue #3893
Bram Moolenaar <Bram@vim.org>
parents: 18131
diff changeset
178
956a9bc4e25a patch 8.1.2206: no test for fixed issue #3893
Bram Moolenaar <Bram@vim.org>
parents: 18131
diff changeset
179 " clean up
956a9bc4e25a patch 8.1.2206: no test for fixed issue #3893
Bram Moolenaar <Bram@vim.org>
parents: 18131
diff changeset
180 call StopVimInTerminal(buf)
956a9bc4e25a patch 8.1.2206: no test for fixed issue #3893
Bram Moolenaar <Bram@vim.org>
parents: 18131
diff changeset
181 endfunc
18866
a686560cf6c9 patch 8.1.2419: with a long file name the hit-enter prompt appears
Bram Moolenaar <Bram@vim.org>
parents: 18424
diff changeset
182
a686560cf6c9 patch 8.1.2419: with a long file name the hit-enter prompt appears
Bram Moolenaar <Bram@vim.org>
parents: 18424
diff changeset
183 " check a long file name does not result in the hit-enter prompt
a686560cf6c9 patch 8.1.2419: with a long file name the hit-enter prompt appears
Bram Moolenaar <Bram@vim.org>
parents: 18424
diff changeset
184 func Test_edit_long_file_name()
a686560cf6c9 patch 8.1.2419: with a long file name the hit-enter prompt appears
Bram Moolenaar <Bram@vim.org>
parents: 18424
diff changeset
185 CheckScreendump
a686560cf6c9 patch 8.1.2419: with a long file name the hit-enter prompt appears
Bram Moolenaar <Bram@vim.org>
parents: 18424
diff changeset
186
18890
623afba3566a patch 8.2.0006: test using long file name may fail
Bram Moolenaar <Bram@vim.org>
parents: 18866
diff changeset
187 let longName = 'x'->repeat(min([&columns, 255]))
30379
25e3121ed316 patch 9.0.0525: manually deleting temp test files
Bram Moolenaar <Bram@vim.org>
parents: 29387
diff changeset
188 call writefile([], longName, 'D')
18866
a686560cf6c9 patch 8.1.2419: with a long file name the hit-enter prompt appears
Bram Moolenaar <Bram@vim.org>
parents: 18424
diff changeset
189 let buf = RunVimInTerminal('-N -u NONE ' .. longName, #{rows: 8})
a686560cf6c9 patch 8.1.2419: with a long file name the hit-enter prompt appears
Bram Moolenaar <Bram@vim.org>
parents: 18424
diff changeset
190
a686560cf6c9 patch 8.1.2419: with a long file name the hit-enter prompt appears
Bram Moolenaar <Bram@vim.org>
parents: 18424
diff changeset
191 call VerifyScreenDump(buf, 'Test_long_file_name_1', {})
a686560cf6c9 patch 8.1.2419: with a long file name the hit-enter prompt appears
Bram Moolenaar <Bram@vim.org>
parents: 18424
diff changeset
192
a686560cf6c9 patch 8.1.2419: with a long file name the hit-enter prompt appears
Bram Moolenaar <Bram@vim.org>
parents: 18424
diff changeset
193 " clean up
a686560cf6c9 patch 8.1.2419: with a long file name the hit-enter prompt appears
Bram Moolenaar <Bram@vim.org>
parents: 18424
diff changeset
194 call StopVimInTerminal(buf)
a686560cf6c9 patch 8.1.2419: with a long file name the hit-enter prompt appears
Bram Moolenaar <Bram@vim.org>
parents: 18424
diff changeset
195 endfunc
a686560cf6c9 patch 8.1.2419: with a long file name the hit-enter prompt appears
Bram Moolenaar <Bram@vim.org>
parents: 18424
diff changeset
196
20782
c4bce986c31a patch 8.2.0943: displaying ^M or ^J depends on current buffer
Bram Moolenaar <Bram@vim.org>
parents: 19954
diff changeset
197 func Test_unprintable_fileformats()
c4bce986c31a patch 8.2.0943: displaying ^M or ^J depends on current buffer
Bram Moolenaar <Bram@vim.org>
parents: 19954
diff changeset
198 CheckScreendump
c4bce986c31a patch 8.2.0943: displaying ^M or ^J depends on current buffer
Bram Moolenaar <Bram@vim.org>
parents: 19954
diff changeset
199
30379
25e3121ed316 patch 9.0.0525: manually deleting temp test files
Bram Moolenaar <Bram@vim.org>
parents: 29387
diff changeset
200 call writefile(["unix\r", "two"], 'Xunix.txt', 'D')
25e3121ed316 patch 9.0.0525: manually deleting temp test files
Bram Moolenaar <Bram@vim.org>
parents: 29387
diff changeset
201 call writefile(["mac\r", "two"], 'Xmac.txt', 'D')
20782
c4bce986c31a patch 8.2.0943: displaying ^M or ^J depends on current buffer
Bram Moolenaar <Bram@vim.org>
parents: 19954
diff changeset
202 let lines =<< trim END
c4bce986c31a patch 8.2.0943: displaying ^M or ^J depends on current buffer
Bram Moolenaar <Bram@vim.org>
parents: 19954
diff changeset
203 edit Xunix.txt
c4bce986c31a patch 8.2.0943: displaying ^M or ^J depends on current buffer
Bram Moolenaar <Bram@vim.org>
parents: 19954
diff changeset
204 split Xmac.txt
c4bce986c31a patch 8.2.0943: displaying ^M or ^J depends on current buffer
Bram Moolenaar <Bram@vim.org>
parents: 19954
diff changeset
205 edit ++ff=mac
c4bce986c31a patch 8.2.0943: displaying ^M or ^J depends on current buffer
Bram Moolenaar <Bram@vim.org>
parents: 19954
diff changeset
206 END
c4bce986c31a patch 8.2.0943: displaying ^M or ^J depends on current buffer
Bram Moolenaar <Bram@vim.org>
parents: 19954
diff changeset
207 let filename = 'Xunprintable'
30379
25e3121ed316 patch 9.0.0525: manually deleting temp test files
Bram Moolenaar <Bram@vim.org>
parents: 29387
diff changeset
208 call writefile(lines, filename, 'D')
20782
c4bce986c31a patch 8.2.0943: displaying ^M or ^J depends on current buffer
Bram Moolenaar <Bram@vim.org>
parents: 19954
diff changeset
209 let buf = RunVimInTerminal('-S '.filename, #{rows: 9, cols: 50})
c4bce986c31a patch 8.2.0943: displaying ^M or ^J depends on current buffer
Bram Moolenaar <Bram@vim.org>
parents: 19954
diff changeset
210 call VerifyScreenDump(buf, 'Test_display_unprintable_01', {})
c4bce986c31a patch 8.2.0943: displaying ^M or ^J depends on current buffer
Bram Moolenaar <Bram@vim.org>
parents: 19954
diff changeset
211 call term_sendkeys(buf, "\<C-W>\<C-W>\<C-L>")
c4bce986c31a patch 8.2.0943: displaying ^M or ^J depends on current buffer
Bram Moolenaar <Bram@vim.org>
parents: 19954
diff changeset
212 call VerifyScreenDump(buf, 'Test_display_unprintable_02', {})
c4bce986c31a patch 8.2.0943: displaying ^M or ^J depends on current buffer
Bram Moolenaar <Bram@vim.org>
parents: 19954
diff changeset
213
c4bce986c31a patch 8.2.0943: displaying ^M or ^J depends on current buffer
Bram Moolenaar <Bram@vim.org>
parents: 19954
diff changeset
214 " clean up
c4bce986c31a patch 8.2.0943: displaying ^M or ^J depends on current buffer
Bram Moolenaar <Bram@vim.org>
parents: 19954
diff changeset
215 call StopVimInTerminal(buf)
c4bce986c31a patch 8.2.0943: displaying ^M or ^J depends on current buffer
Bram Moolenaar <Bram@vim.org>
parents: 19954
diff changeset
216 endfunc
21590
5f4a188dead8 patch 8.2.1345: Redraw error when using visual block and scroll
Bram Moolenaar <Bram@vim.org>
parents: 20782
diff changeset
217
5f4a188dead8 patch 8.2.1345: Redraw error when using visual block and scroll
Bram Moolenaar <Bram@vim.org>
parents: 20782
diff changeset
218 " Test for scrolling that modifies buffer during visual block
5f4a188dead8 patch 8.2.1345: Redraw error when using visual block and scroll
Bram Moolenaar <Bram@vim.org>
parents: 20782
diff changeset
219 func Test_visual_block_scroll()
5f4a188dead8 patch 8.2.1345: Redraw error when using visual block and scroll
Bram Moolenaar <Bram@vim.org>
parents: 20782
diff changeset
220 CheckScreendump
5f4a188dead8 patch 8.2.1345: Redraw error when using visual block and scroll
Bram Moolenaar <Bram@vim.org>
parents: 20782
diff changeset
221
5f4a188dead8 patch 8.2.1345: Redraw error when using visual block and scroll
Bram Moolenaar <Bram@vim.org>
parents: 20782
diff changeset
222 let lines =<< trim END
5f4a188dead8 patch 8.2.1345: Redraw error when using visual block and scroll
Bram Moolenaar <Bram@vim.org>
parents: 20782
diff changeset
223 source $VIMRUNTIME/plugin/matchparen.vim
5f4a188dead8 patch 8.2.1345: Redraw error when using visual block and scroll
Bram Moolenaar <Bram@vim.org>
parents: 20782
diff changeset
224 set scrolloff=1
5f4a188dead8 patch 8.2.1345: Redraw error when using visual block and scroll
Bram Moolenaar <Bram@vim.org>
parents: 20782
diff changeset
225 call setline(1, ['a', 'b', 'c', 'd', 'e', '', '{', '}', '{', 'f', 'g', '}'])
5f4a188dead8 patch 8.2.1345: Redraw error when using visual block and scroll
Bram Moolenaar <Bram@vim.org>
parents: 20782
diff changeset
226 call cursor(5, 1)
5f4a188dead8 patch 8.2.1345: Redraw error when using visual block and scroll
Bram Moolenaar <Bram@vim.org>
parents: 20782
diff changeset
227 END
5f4a188dead8 patch 8.2.1345: Redraw error when using visual block and scroll
Bram Moolenaar <Bram@vim.org>
parents: 20782
diff changeset
228
5f4a188dead8 patch 8.2.1345: Redraw error when using visual block and scroll
Bram Moolenaar <Bram@vim.org>
parents: 20782
diff changeset
229 let filename = 'Xvisualblockmodifiedscroll'
30379
25e3121ed316 patch 9.0.0525: manually deleting temp test files
Bram Moolenaar <Bram@vim.org>
parents: 29387
diff changeset
230 call writefile(lines, filename, 'D')
21590
5f4a188dead8 patch 8.2.1345: Redraw error when using visual block and scroll
Bram Moolenaar <Bram@vim.org>
parents: 20782
diff changeset
231
5f4a188dead8 patch 8.2.1345: Redraw error when using visual block and scroll
Bram Moolenaar <Bram@vim.org>
parents: 20782
diff changeset
232 let buf = RunVimInTerminal('-S '.filename, #{rows: 7})
5f4a188dead8 patch 8.2.1345: Redraw error when using visual block and scroll
Bram Moolenaar <Bram@vim.org>
parents: 20782
diff changeset
233 call term_sendkeys(buf, "V\<C-D>\<C-D>")
5f4a188dead8 patch 8.2.1345: Redraw error when using visual block and scroll
Bram Moolenaar <Bram@vim.org>
parents: 20782
diff changeset
234
5f4a188dead8 patch 8.2.1345: Redraw error when using visual block and scroll
Bram Moolenaar <Bram@vim.org>
parents: 20782
diff changeset
235 call VerifyScreenDump(buf, 'Test_display_visual_block_scroll', {})
5f4a188dead8 patch 8.2.1345: Redraw error when using visual block and scroll
Bram Moolenaar <Bram@vim.org>
parents: 20782
diff changeset
236
5f4a188dead8 patch 8.2.1345: Redraw error when using visual block and scroll
Bram Moolenaar <Bram@vim.org>
parents: 20782
diff changeset
237 call StopVimInTerminal(buf)
5f4a188dead8 patch 8.2.1345: Redraw error when using visual block and scroll
Bram Moolenaar <Bram@vim.org>
parents: 20782
diff changeset
238 endfunc
21765
08940efa6b4e patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents: 21590
diff changeset
239
21877
7fb29e719d79 patch 8.2.1488: text does not scroll when inserting above first line
Bram Moolenaar <Bram@vim.org>
parents: 21765
diff changeset
240 func Test_display_scroll_at_topline()
7fb29e719d79 patch 8.2.1488: text does not scroll when inserting above first line
Bram Moolenaar <Bram@vim.org>
parents: 21765
diff changeset
241 CheckScreendump
7fb29e719d79 patch 8.2.1488: text does not scroll when inserting above first line
Bram Moolenaar <Bram@vim.org>
parents: 21765
diff changeset
242
7fb29e719d79 patch 8.2.1488: text does not scroll when inserting above first line
Bram Moolenaar <Bram@vim.org>
parents: 21765
diff changeset
243 let buf = RunVimInTerminal('', #{cols: 20})
7fb29e719d79 patch 8.2.1488: text does not scroll when inserting above first line
Bram Moolenaar <Bram@vim.org>
parents: 21765
diff changeset
244 call term_sendkeys(buf, ":call setline(1, repeat('a', 21))\<CR>")
21897
e0af4660dfc7 patch 8.2.1498: on slow systems tests can be flaky
Bram Moolenaar <Bram@vim.org>
parents: 21877
diff changeset
245 call TermWait(buf)
21877
7fb29e719d79 patch 8.2.1488: text does not scroll when inserting above first line
Bram Moolenaar <Bram@vim.org>
parents: 21765
diff changeset
246 call term_sendkeys(buf, "O\<Esc>")
7fb29e719d79 patch 8.2.1488: text does not scroll when inserting above first line
Bram Moolenaar <Bram@vim.org>
parents: 21765
diff changeset
247 call VerifyScreenDump(buf, 'Test_display_scroll_at_topline', #{rows: 4})
7fb29e719d79 patch 8.2.1488: text does not scroll when inserting above first line
Bram Moolenaar <Bram@vim.org>
parents: 21765
diff changeset
248
7fb29e719d79 patch 8.2.1488: text does not scroll when inserting above first line
Bram Moolenaar <Bram@vim.org>
parents: 21765
diff changeset
249 call StopVimInTerminal(buf)
7fb29e719d79 patch 8.2.1488: text does not scroll when inserting above first line
Bram Moolenaar <Bram@vim.org>
parents: 21765
diff changeset
250 endfunc
7fb29e719d79 patch 8.2.1488: text does not scroll when inserting above first line
Bram Moolenaar <Bram@vim.org>
parents: 21765
diff changeset
251
28201
bdd6df4832ba patch 8.2.4626: Visual area not updated when removing sign in Visual mode
Bram Moolenaar <Bram@vim.org>
parents: 27626
diff changeset
252 func Test_display_scroll_update_visual()
bdd6df4832ba patch 8.2.4626: Visual area not updated when removing sign in Visual mode
Bram Moolenaar <Bram@vim.org>
parents: 27626
diff changeset
253 CheckScreendump
bdd6df4832ba patch 8.2.4626: Visual area not updated when removing sign in Visual mode
Bram Moolenaar <Bram@vim.org>
parents: 27626
diff changeset
254
bdd6df4832ba patch 8.2.4626: Visual area not updated when removing sign in Visual mode
Bram Moolenaar <Bram@vim.org>
parents: 27626
diff changeset
255 let lines =<< trim END
bdd6df4832ba patch 8.2.4626: Visual area not updated when removing sign in Visual mode
Bram Moolenaar <Bram@vim.org>
parents: 27626
diff changeset
256 set scrolloff=0
bdd6df4832ba patch 8.2.4626: Visual area not updated when removing sign in Visual mode
Bram Moolenaar <Bram@vim.org>
parents: 27626
diff changeset
257 call setline(1, repeat(['foo'], 10))
bdd6df4832ba patch 8.2.4626: Visual area not updated when removing sign in Visual mode
Bram Moolenaar <Bram@vim.org>
parents: 27626
diff changeset
258 call sign_define('foo', { 'text': '>' })
bdd6df4832ba patch 8.2.4626: Visual area not updated when removing sign in Visual mode
Bram Moolenaar <Bram@vim.org>
parents: 27626
diff changeset
259 call sign_place(1, 'bar', 'foo', bufnr(), { 'lnum': 2 })
bdd6df4832ba patch 8.2.4626: Visual area not updated when removing sign in Visual mode
Bram Moolenaar <Bram@vim.org>
parents: 27626
diff changeset
260 call sign_place(2, 'bar', 'foo', bufnr(), { 'lnum': 1 })
bdd6df4832ba patch 8.2.4626: Visual area not updated when removing sign in Visual mode
Bram Moolenaar <Bram@vim.org>
parents: 27626
diff changeset
261 autocmd CursorMoved * if getcurpos()[1] == 2 | call sign_unplace('bar', { 'id': 1 }) | endif
bdd6df4832ba patch 8.2.4626: Visual area not updated when removing sign in Visual mode
Bram Moolenaar <Bram@vim.org>
parents: 27626
diff changeset
262 END
30379
25e3121ed316 patch 9.0.0525: manually deleting temp test files
Bram Moolenaar <Bram@vim.org>
parents: 29387
diff changeset
263 call writefile(lines, 'XupdateVisual.vim', 'D')
28201
bdd6df4832ba patch 8.2.4626: Visual area not updated when removing sign in Visual mode
Bram Moolenaar <Bram@vim.org>
parents: 27626
diff changeset
264
bdd6df4832ba patch 8.2.4626: Visual area not updated when removing sign in Visual mode
Bram Moolenaar <Bram@vim.org>
parents: 27626
diff changeset
265 let buf = RunVimInTerminal('-S XupdateVisual.vim', #{rows: 8, cols: 60})
bdd6df4832ba patch 8.2.4626: Visual area not updated when removing sign in Visual mode
Bram Moolenaar <Bram@vim.org>
parents: 27626
diff changeset
266 call term_sendkeys(buf, "VG7kk")
bdd6df4832ba patch 8.2.4626: Visual area not updated when removing sign in Visual mode
Bram Moolenaar <Bram@vim.org>
parents: 27626
diff changeset
267 call VerifyScreenDump(buf, 'Test_display_scroll_update_visual', {})
bdd6df4832ba patch 8.2.4626: Visual area not updated when removing sign in Visual mode
Bram Moolenaar <Bram@vim.org>
parents: 27626
diff changeset
268
bdd6df4832ba patch 8.2.4626: Visual area not updated when removing sign in Visual mode
Bram Moolenaar <Bram@vim.org>
parents: 27626
diff changeset
269 call StopVimInTerminal(buf)
bdd6df4832ba patch 8.2.4626: Visual area not updated when removing sign in Visual mode
Bram Moolenaar <Bram@vim.org>
parents: 27626
diff changeset
270 endfunc
bdd6df4832ba patch 8.2.4626: Visual area not updated when removing sign in Visual mode
Bram Moolenaar <Bram@vim.org>
parents: 27626
diff changeset
271
23932
4549133c1e77 patch 8.2.2508: cannot change the character displayed in non existing lines
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
272 " Test for 'eob' (EndOfBuffer) item in 'fillchars'
4549133c1e77 patch 8.2.2508: cannot change the character displayed in non existing lines
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
273 func Test_eob_fillchars()
4549133c1e77 patch 8.2.2508: cannot change the character displayed in non existing lines
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
274 " default value
4549133c1e77 patch 8.2.2508: cannot change the character displayed in non existing lines
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
275 call assert_match('eob:\~', &fillchars)
4549133c1e77 patch 8.2.2508: cannot change the character displayed in non existing lines
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
276 " invalid values
4549133c1e77 patch 8.2.2508: cannot change the character displayed in non existing lines
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
277 call assert_fails(':set fillchars=eob:', 'E474:')
4549133c1e77 patch 8.2.2508: cannot change the character displayed in non existing lines
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
278 call assert_fails(':set fillchars=eob:xy', 'E474:')
4549133c1e77 patch 8.2.2508: cannot change the character displayed in non existing lines
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
279 call assert_fails(':set fillchars=eob:\255', 'E474:')
4549133c1e77 patch 8.2.2508: cannot change the character displayed in non existing lines
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
280 call assert_fails(':set fillchars=eob:<ff>', 'E474:')
26634
c75f70257cf5 patch 8.2.3846: no error when using control character for 'lcs' or 'fcs'
Bram Moolenaar <Bram@vim.org>
parents: 24729
diff changeset
281 call assert_fails(":set fillchars=eob:\x01", 'E474:')
c75f70257cf5 patch 8.2.3846: no error when using control character for 'lcs' or 'fcs'
Bram Moolenaar <Bram@vim.org>
parents: 24729
diff changeset
282 call assert_fails(':set fillchars=eob:\\x01', 'E474:')
23932
4549133c1e77 patch 8.2.2508: cannot change the character displayed in non existing lines
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
283 " default is ~
4549133c1e77 patch 8.2.2508: cannot change the character displayed in non existing lines
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
284 new
24200
dafaa9c80334 patch 8.2.2641: display test fails because of lacking redraw
Bram Moolenaar <Bram@vim.org>
parents: 23964
diff changeset
285 redraw
23932
4549133c1e77 patch 8.2.2508: cannot change the character displayed in non existing lines
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
286 call assert_equal('~', Screenline(2))
4549133c1e77 patch 8.2.2508: cannot change the character displayed in non existing lines
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
287 set fillchars=eob:+
24200
dafaa9c80334 patch 8.2.2641: display test fails because of lacking redraw
Bram Moolenaar <Bram@vim.org>
parents: 23964
diff changeset
288 redraw
23932
4549133c1e77 patch 8.2.2508: cannot change the character displayed in non existing lines
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
289 call assert_equal('+', Screenline(2))
4549133c1e77 patch 8.2.2508: cannot change the character displayed in non existing lines
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
290 set fillchars=eob:\
24200
dafaa9c80334 patch 8.2.2641: display test fails because of lacking redraw
Bram Moolenaar <Bram@vim.org>
parents: 23964
diff changeset
291 redraw
23932
4549133c1e77 patch 8.2.2508: cannot change the character displayed in non existing lines
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
292 call assert_equal(' ', nr2char(screenchar(2, 1)))
4549133c1e77 patch 8.2.2508: cannot change the character displayed in non existing lines
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
293 set fillchars&
4549133c1e77 patch 8.2.2508: cannot change the character displayed in non existing lines
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
294 close
4549133c1e77 patch 8.2.2508: cannot change the character displayed in non existing lines
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
295 endfunc
4549133c1e77 patch 8.2.2508: cannot change the character displayed in non existing lines
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
296
23964
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
297 " Test for 'foldopen', 'foldclose' and 'foldsep' in 'fillchars'
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
298 func Test_fold_fillchars()
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
299 new
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
300 set fdc=2 foldenable foldmethod=manual
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
301 call setline(1, ['one', 'two', 'three', 'four', 'five'])
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
302 2,4fold
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
303 " First check for the default setting for a closed fold
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
304 let lines = ScreenLines([1, 3], 8)
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
305 let expected = [
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
306 \ ' one ',
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
307 \ '+ +-- 3',
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
308 \ ' five '
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
309 \ ]
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
310 call assert_equal(expected, lines)
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
311 normal 2Gzo
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
312 " check the characters for an open fold
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
313 let lines = ScreenLines([1, 5], 8)
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
314 let expected = [
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
315 \ ' one ',
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
316 \ '- two ',
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
317 \ '| three ',
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
318 \ '| four ',
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
319 \ ' five '
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
320 \ ]
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
321 call assert_equal(expected, lines)
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
322
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
323 " change the setting
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
324 set fillchars=vert:\|,fold:-,eob:~,foldopen:[,foldclose:],foldsep:-
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
325
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
326 " check the characters for an open fold
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
327 let lines = ScreenLines([1, 5], 8)
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
328 let expected = [
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
329 \ ' one ',
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
330 \ '[ two ',
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
331 \ '- three ',
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
332 \ '- four ',
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
333 \ ' five '
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
334 \ ]
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
335 call assert_equal(expected, lines)
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
336
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
337 " check the characters for a closed fold
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
338 normal 2Gzc
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
339 let lines = ScreenLines([1, 3], 8)
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
340 let expected = [
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
341 \ ' one ',
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
342 \ '] +-- 3',
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
343 \ ' five '
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
344 \ ]
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
345 call assert_equal(expected, lines)
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
346
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
347 %bw!
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
348 set fillchars& fdc& foldmethod& foldenable&
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
349 endfunc
17697c4e5d48 patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Bram Moolenaar <Bram@vim.org>
parents: 23932
diff changeset
350
29387
9dce192d1ac2 patch 9.0.0036: 'fillchars' cannot have window-local values
Bram Moolenaar <Bram@vim.org>
parents: 28386
diff changeset
351 func Test_local_fillchars()
9dce192d1ac2 patch 9.0.0036: 'fillchars' cannot have window-local values
Bram Moolenaar <Bram@vim.org>
parents: 28386
diff changeset
352 CheckScreendump
9dce192d1ac2 patch 9.0.0036: 'fillchars' cannot have window-local values
Bram Moolenaar <Bram@vim.org>
parents: 28386
diff changeset
353
9dce192d1ac2 patch 9.0.0036: 'fillchars' cannot have window-local values
Bram Moolenaar <Bram@vim.org>
parents: 28386
diff changeset
354 let lines =<< trim END
9dce192d1ac2 patch 9.0.0036: 'fillchars' cannot have window-local values
Bram Moolenaar <Bram@vim.org>
parents: 28386
diff changeset
355 call setline(1, ['window 1']->repeat(3))
9dce192d1ac2 patch 9.0.0036: 'fillchars' cannot have window-local values
Bram Moolenaar <Bram@vim.org>
parents: 28386
diff changeset
356 setlocal fillchars=stl:1,stlnc:a,vert:=,eob:x
9dce192d1ac2 patch 9.0.0036: 'fillchars' cannot have window-local values
Bram Moolenaar <Bram@vim.org>
parents: 28386
diff changeset
357 vnew
9dce192d1ac2 patch 9.0.0036: 'fillchars' cannot have window-local values
Bram Moolenaar <Bram@vim.org>
parents: 28386
diff changeset
358 call setline(1, ['window 2']->repeat(3))
9dce192d1ac2 patch 9.0.0036: 'fillchars' cannot have window-local values
Bram Moolenaar <Bram@vim.org>
parents: 28386
diff changeset
359 setlocal fillchars=stl:2,stlnc:b,vert:+,eob:y
9dce192d1ac2 patch 9.0.0036: 'fillchars' cannot have window-local values
Bram Moolenaar <Bram@vim.org>
parents: 28386
diff changeset
360 new
9dce192d1ac2 patch 9.0.0036: 'fillchars' cannot have window-local values
Bram Moolenaar <Bram@vim.org>
parents: 28386
diff changeset
361 wincmd J
9dce192d1ac2 patch 9.0.0036: 'fillchars' cannot have window-local values
Bram Moolenaar <Bram@vim.org>
parents: 28386
diff changeset
362 call setline(1, ['window 3']->repeat(3))
9dce192d1ac2 patch 9.0.0036: 'fillchars' cannot have window-local values
Bram Moolenaar <Bram@vim.org>
parents: 28386
diff changeset
363 setlocal fillchars=stl:3,stlnc:c,vert:<,eob:z
9dce192d1ac2 patch 9.0.0036: 'fillchars' cannot have window-local values
Bram Moolenaar <Bram@vim.org>
parents: 28386
diff changeset
364 vnew
9dce192d1ac2 patch 9.0.0036: 'fillchars' cannot have window-local values
Bram Moolenaar <Bram@vim.org>
parents: 28386
diff changeset
365 call setline(1, ['window 4']->repeat(3))
9dce192d1ac2 patch 9.0.0036: 'fillchars' cannot have window-local values
Bram Moolenaar <Bram@vim.org>
parents: 28386
diff changeset
366 setlocal fillchars=stl:4,stlnc:d,vert:>,eob:o
9dce192d1ac2 patch 9.0.0036: 'fillchars' cannot have window-local values
Bram Moolenaar <Bram@vim.org>
parents: 28386
diff changeset
367 END
30379
25e3121ed316 patch 9.0.0525: manually deleting temp test files
Bram Moolenaar <Bram@vim.org>
parents: 29387
diff changeset
368 call writefile(lines, 'Xdisplayfillchars', 'D')
29387
9dce192d1ac2 patch 9.0.0036: 'fillchars' cannot have window-local values
Bram Moolenaar <Bram@vim.org>
parents: 28386
diff changeset
369 let buf = RunVimInTerminal('-S Xdisplayfillchars', #{rows: 12})
9dce192d1ac2 patch 9.0.0036: 'fillchars' cannot have window-local values
Bram Moolenaar <Bram@vim.org>
parents: 28386
diff changeset
370 call VerifyScreenDump(buf, 'Test_display_fillchars_1', {})
9dce192d1ac2 patch 9.0.0036: 'fillchars' cannot have window-local values
Bram Moolenaar <Bram@vim.org>
parents: 28386
diff changeset
371
9dce192d1ac2 patch 9.0.0036: 'fillchars' cannot have window-local values
Bram Moolenaar <Bram@vim.org>
parents: 28386
diff changeset
372 call term_sendkeys(buf, ":wincmd k\r")
9dce192d1ac2 patch 9.0.0036: 'fillchars' cannot have window-local values
Bram Moolenaar <Bram@vim.org>
parents: 28386
diff changeset
373 call VerifyScreenDump(buf, 'Test_display_fillchars_2', {})
9dce192d1ac2 patch 9.0.0036: 'fillchars' cannot have window-local values
Bram Moolenaar <Bram@vim.org>
parents: 28386
diff changeset
374
9dce192d1ac2 patch 9.0.0036: 'fillchars' cannot have window-local values
Bram Moolenaar <Bram@vim.org>
parents: 28386
diff changeset
375 call StopVimInTerminal(buf)
9dce192d1ac2 patch 9.0.0036: 'fillchars' cannot have window-local values
Bram Moolenaar <Bram@vim.org>
parents: 28386
diff changeset
376 endfunc
9dce192d1ac2 patch 9.0.0036: 'fillchars' cannot have window-local values
Bram Moolenaar <Bram@vim.org>
parents: 28386
diff changeset
377
24729
03492b62d79a patch 8.2.2903: cursor position wrong on wrapped line with 'signcolumn'
Bram Moolenaar <Bram@vim.org>
parents: 24200
diff changeset
378 func Test_display_linebreak_breakat()
03492b62d79a patch 8.2.2903: cursor position wrong on wrapped line with 'signcolumn'
Bram Moolenaar <Bram@vim.org>
parents: 24200
diff changeset
379 new
03492b62d79a patch 8.2.2903: cursor position wrong on wrapped line with 'signcolumn'
Bram Moolenaar <Bram@vim.org>
parents: 24200
diff changeset
380 vert resize 25
03492b62d79a patch 8.2.2903: cursor position wrong on wrapped line with 'signcolumn'
Bram Moolenaar <Bram@vim.org>
parents: 24200
diff changeset
381 let _breakat = &breakat
03492b62d79a patch 8.2.2903: cursor position wrong on wrapped line with 'signcolumn'
Bram Moolenaar <Bram@vim.org>
parents: 24200
diff changeset
382 setl signcolumn=yes linebreak breakat=) showbreak=+\
03492b62d79a patch 8.2.2903: cursor position wrong on wrapped line with 'signcolumn'
Bram Moolenaar <Bram@vim.org>
parents: 24200
diff changeset
383 call setline(1, repeat('x', winwidth(0) - 2) .. ')abc')
03492b62d79a patch 8.2.2903: cursor position wrong on wrapped line with 'signcolumn'
Bram Moolenaar <Bram@vim.org>
parents: 24200
diff changeset
384 let lines = ScreenLines([1, 2], 25)
03492b62d79a patch 8.2.2903: cursor position wrong on wrapped line with 'signcolumn'
Bram Moolenaar <Bram@vim.org>
parents: 24200
diff changeset
385 let expected = [
03492b62d79a patch 8.2.2903: cursor position wrong on wrapped line with 'signcolumn'
Bram Moolenaar <Bram@vim.org>
parents: 24200
diff changeset
386 \ ' xxxxxxxxxxxxxxxxxxxxxxx',
03492b62d79a patch 8.2.2903: cursor position wrong on wrapped line with 'signcolumn'
Bram Moolenaar <Bram@vim.org>
parents: 24200
diff changeset
387 \ ' + )abc '
03492b62d79a patch 8.2.2903: cursor position wrong on wrapped line with 'signcolumn'
Bram Moolenaar <Bram@vim.org>
parents: 24200
diff changeset
388 \ ]
03492b62d79a patch 8.2.2903: cursor position wrong on wrapped line with 'signcolumn'
Bram Moolenaar <Bram@vim.org>
parents: 24200
diff changeset
389 call assert_equal(expected, lines)
03492b62d79a patch 8.2.2903: cursor position wrong on wrapped line with 'signcolumn'
Bram Moolenaar <Bram@vim.org>
parents: 24200
diff changeset
390 %bw!
03492b62d79a patch 8.2.2903: cursor position wrong on wrapped line with 'signcolumn'
Bram Moolenaar <Bram@vim.org>
parents: 24200
diff changeset
391 let &breakat=_breakat
03492b62d79a patch 8.2.2903: cursor position wrong on wrapped line with 'signcolumn'
Bram Moolenaar <Bram@vim.org>
parents: 24200
diff changeset
392 endfunc
03492b62d79a patch 8.2.2903: cursor position wrong on wrapped line with 'signcolumn'
Bram Moolenaar <Bram@vim.org>
parents: 24200
diff changeset
393
28386
cf41a1f469f6 patch 8.2.4718: @@@ in the last line sometimes drawn in the wrong place
Bram Moolenaar <Bram@vim.org>
parents: 28201
diff changeset
394 func Test_display_lastline()
cf41a1f469f6 patch 8.2.4718: @@@ in the last line sometimes drawn in the wrong place
Bram Moolenaar <Bram@vim.org>
parents: 28201
diff changeset
395 CheckScreendump
cf41a1f469f6 patch 8.2.4718: @@@ in the last line sometimes drawn in the wrong place
Bram Moolenaar <Bram@vim.org>
parents: 28201
diff changeset
396
cf41a1f469f6 patch 8.2.4718: @@@ in the last line sometimes drawn in the wrong place
Bram Moolenaar <Bram@vim.org>
parents: 28201
diff changeset
397 let lines =<< trim END
cf41a1f469f6 patch 8.2.4718: @@@ in the last line sometimes drawn in the wrong place
Bram Moolenaar <Bram@vim.org>
parents: 28201
diff changeset
398 call setline(1, ['aaa', 'b'->repeat(100)])
cf41a1f469f6 patch 8.2.4718: @@@ in the last line sometimes drawn in the wrong place
Bram Moolenaar <Bram@vim.org>
parents: 28201
diff changeset
399 set display=truncate
cf41a1f469f6 patch 8.2.4718: @@@ in the last line sometimes drawn in the wrong place
Bram Moolenaar <Bram@vim.org>
parents: 28201
diff changeset
400 vsplit
cf41a1f469f6 patch 8.2.4718: @@@ in the last line sometimes drawn in the wrong place
Bram Moolenaar <Bram@vim.org>
parents: 28201
diff changeset
401 100wincmd <
cf41a1f469f6 patch 8.2.4718: @@@ in the last line sometimes drawn in the wrong place
Bram Moolenaar <Bram@vim.org>
parents: 28201
diff changeset
402 END
30379
25e3121ed316 patch 9.0.0525: manually deleting temp test files
Bram Moolenaar <Bram@vim.org>
parents: 29387
diff changeset
403 call writefile(lines, 'XdispLastline', 'D')
28386
cf41a1f469f6 patch 8.2.4718: @@@ in the last line sometimes drawn in the wrong place
Bram Moolenaar <Bram@vim.org>
parents: 28201
diff changeset
404 let buf = RunVimInTerminal('-S XdispLastline', #{rows: 10})
cf41a1f469f6 patch 8.2.4718: @@@ in the last line sometimes drawn in the wrong place
Bram Moolenaar <Bram@vim.org>
parents: 28201
diff changeset
405 call VerifyScreenDump(buf, 'Test_display_lastline_1', {})
cf41a1f469f6 patch 8.2.4718: @@@ in the last line sometimes drawn in the wrong place
Bram Moolenaar <Bram@vim.org>
parents: 28201
diff changeset
406
cf41a1f469f6 patch 8.2.4718: @@@ in the last line sometimes drawn in the wrong place
Bram Moolenaar <Bram@vim.org>
parents: 28201
diff changeset
407 call term_sendkeys(buf, ":set display=lastline\<CR>")
cf41a1f469f6 patch 8.2.4718: @@@ in the last line sometimes drawn in the wrong place
Bram Moolenaar <Bram@vim.org>
parents: 28201
diff changeset
408 call VerifyScreenDump(buf, 'Test_display_lastline_2', {})
cf41a1f469f6 patch 8.2.4718: @@@ in the last line sometimes drawn in the wrong place
Bram Moolenaar <Bram@vim.org>
parents: 28201
diff changeset
409
cf41a1f469f6 patch 8.2.4718: @@@ in the last line sometimes drawn in the wrong place
Bram Moolenaar <Bram@vim.org>
parents: 28201
diff changeset
410 call term_sendkeys(buf, ":100wincmd >\<CR>")
cf41a1f469f6 patch 8.2.4718: @@@ in the last line sometimes drawn in the wrong place
Bram Moolenaar <Bram@vim.org>
parents: 28201
diff changeset
411 call VerifyScreenDump(buf, 'Test_display_lastline_3', {})
cf41a1f469f6 patch 8.2.4718: @@@ in the last line sometimes drawn in the wrong place
Bram Moolenaar <Bram@vim.org>
parents: 28201
diff changeset
412
cf41a1f469f6 patch 8.2.4718: @@@ in the last line sometimes drawn in the wrong place
Bram Moolenaar <Bram@vim.org>
parents: 28201
diff changeset
413 call term_sendkeys(buf, ":set display=truncate\<CR>")
cf41a1f469f6 patch 8.2.4718: @@@ in the last line sometimes drawn in the wrong place
Bram Moolenaar <Bram@vim.org>
parents: 28201
diff changeset
414 call VerifyScreenDump(buf, 'Test_display_lastline_4', {})
cf41a1f469f6 patch 8.2.4718: @@@ in the last line sometimes drawn in the wrong place
Bram Moolenaar <Bram@vim.org>
parents: 28201
diff changeset
415
cf41a1f469f6 patch 8.2.4718: @@@ in the last line sometimes drawn in the wrong place
Bram Moolenaar <Bram@vim.org>
parents: 28201
diff changeset
416 call StopVimInTerminal(buf)
cf41a1f469f6 patch 8.2.4718: @@@ in the last line sometimes drawn in the wrong place
Bram Moolenaar <Bram@vim.org>
parents: 28201
diff changeset
417 endfunc
cf41a1f469f6 patch 8.2.4718: @@@ in the last line sometimes drawn in the wrong place
Bram Moolenaar <Bram@vim.org>
parents: 28201
diff changeset
418
24729
03492b62d79a patch 8.2.2903: cursor position wrong on wrapped line with 'signcolumn'
Bram Moolenaar <Bram@vim.org>
parents: 24200
diff changeset
419
21765
08940efa6b4e patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents: 21590
diff changeset
420 " vim: shiftwidth=2 sts=2 expandtab