annotate src/testdir/test_cmdwin.vim @ 30308:6b541aaaf39e v9.0.0490

patch 9.0.0490: using freed memory with cmdwin and BufEnter autocmd Commit: https://github.com/vim/vim/commit/1c3dd8ddcba63c1af5112e567215b3cec2de11d0 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Sep 17 19:43:23 2022 +0100 patch 9.0.0490: using freed memory with cmdwin and BufEnter autocmd Problem: Using freed memory with cmdwin and BufEnter autocmd. Solution: Make sure pointer to b_p_iminsert is still valid.
author Bram Moolenaar <Bram@vim.org>
date Sat, 17 Sep 2022 20:45:03 +0200
parents f7a2de8a4ddc
children 84ab2b07d5f8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
29369
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
1 " Tests for editing the command line.
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
2
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
3 source check.vim
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
4 CheckFeature cmdwin
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
5
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
6 source screendump.vim
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
7
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
8 func Test_getcmdwintype()
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
9 call feedkeys("q/:let a = getcmdwintype()\<CR>:q\<CR>", 'x!')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
10 call assert_equal('/', a)
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
11
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
12 call feedkeys("q?:let a = getcmdwintype()\<CR>:q\<CR>", 'x!')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
13 call assert_equal('?', a)
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
14
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
15 call feedkeys("q::let a = getcmdwintype()\<CR>:q\<CR>", 'x!')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
16 call assert_equal(':', a)
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
17
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
18 call feedkeys(":\<C-F>:let a = getcmdwintype()\<CR>:q\<CR>", 'x!')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
19 call assert_equal(':', a)
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
20
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
21 call assert_equal('', getcmdwintype())
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
22 endfunc
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
23
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
24 func Test_getcmdwin_autocmd()
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
25 let s:seq = []
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
26 augroup CmdWin
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
27 au WinEnter * call add(s:seq, 'WinEnter ' .. win_getid())
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
28 au WinLeave * call add(s:seq, 'WinLeave ' .. win_getid())
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
29 au BufEnter * call add(s:seq, 'BufEnter ' .. bufnr())
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
30 au BufLeave * call add(s:seq, 'BufLeave ' .. bufnr())
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
31 au CmdWinEnter * call add(s:seq, 'CmdWinEnter ' .. win_getid())
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
32 au CmdWinLeave * call add(s:seq, 'CmdWinLeave ' .. win_getid())
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
33
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
34 let org_winid = win_getid()
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
35 let org_bufnr = bufnr()
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
36 call feedkeys("q::let a = getcmdwintype()\<CR>:let s:cmd_winid = win_getid()\<CR>:let s:cmd_bufnr = bufnr()\<CR>:q\<CR>", 'x!')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
37 call assert_equal(':', a)
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
38 call assert_equal([
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
39 \ 'WinLeave ' .. org_winid,
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
40 \ 'WinEnter ' .. s:cmd_winid,
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
41 \ 'BufLeave ' .. org_bufnr,
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
42 \ 'BufEnter ' .. s:cmd_bufnr,
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
43 \ 'CmdWinEnter ' .. s:cmd_winid,
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
44 \ 'CmdWinLeave ' .. s:cmd_winid,
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
45 \ 'BufLeave ' .. s:cmd_bufnr,
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
46 \ 'WinLeave ' .. s:cmd_winid,
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
47 \ 'WinEnter ' .. org_winid,
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
48 \ 'BufEnter ' .. org_bufnr,
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
49 \ ], s:seq)
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
50
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
51 au!
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
52 augroup END
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
53 endfunc
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
54
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
55 func Test_cmdwin_bug()
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
56 let winid = win_getid()
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
57 sp
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
58 try
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
59 call feedkeys("q::call win_gotoid(" .. winid .. ")\<CR>:q\<CR>", 'x!')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
60 catch /^Vim\%((\a\+)\)\=:E11/
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
61 endtry
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
62 bw!
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
63 endfunc
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
64
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
65 func Test_cmdwin_restore()
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
66 CheckScreendump
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
67
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
68 let lines =<< trim [SCRIPT]
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
69 augroup vimHints | au! | augroup END
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
70 call setline(1, range(30))
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
71 2split
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
72 [SCRIPT]
30164
f7a2de8a4ddc patch 9.0.0418: manually deleting temp test files
Bram Moolenaar <Bram@vim.org>
parents: 29820
diff changeset
73 call writefile(lines, 'XTest_restore', 'D')
29369
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
74
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
75 let buf = RunVimInTerminal('-S XTest_restore', {'rows': 12})
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
76 call TermWait(buf, 50)
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
77 call term_sendkeys(buf, "q:")
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
78 call VerifyScreenDump(buf, 'Test_cmdwin_restore_1', {})
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
79
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
80 " normal restore
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
81 call term_sendkeys(buf, ":q\<CR>")
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
82 call VerifyScreenDump(buf, 'Test_cmdwin_restore_2', {})
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
83
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
84 " restore after setting 'lines' with one window
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
85 call term_sendkeys(buf, ":close\<CR>")
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
86 call term_sendkeys(buf, "q:")
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
87 call term_sendkeys(buf, ":set lines=18\<CR>")
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
88 call term_sendkeys(buf, ":q\<CR>")
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
89 call VerifyScreenDump(buf, 'Test_cmdwin_restore_3', {})
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
90
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
91 " clean up
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
92 call StopVimInTerminal(buf)
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
93 endfunc
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
94
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
95 func Test_cmdwin_no_terminal()
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
96 CheckFeature terminal
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
97 CheckNotMSWindows
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
98
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
99 let buf = RunVimInTerminal('', {'rows': 12})
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
100 call TermWait(buf, 50)
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
101 call term_sendkeys(buf, ":set cmdheight=2\<CR>")
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
102 call term_sendkeys(buf, "q:")
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
103 call term_sendkeys(buf, ":let buf = term_start(['/bin/echo'], #{hidden: 1})\<CR>")
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
104 call VerifyScreenDump(buf, 'Test_cmdwin_no_terminal', {})
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
105 call term_sendkeys(buf, ":q\<CR>")
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
106 call StopVimInTerminal(buf)
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
107 endfunc
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
108
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
109 func Test_cmdwin_feedkeys()
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
110 " This should not generate E488
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
111 call feedkeys("q:\<CR>", 'x')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
112 " Using feedkeys with q: only should automatically close the cmd window
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
113 call feedkeys('q:', 'xt')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
114 call assert_equal(1, winnr('$'))
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
115 call assert_equal('', getcmdwintype())
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
116 endfunc
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
117
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
118 " Tests for the issues fixed in 7.4.441.
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
119 " When 'cedit' is set to Ctrl-C, opening the command window hangs Vim
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
120 func Test_cmdwin_cedit()
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
121 exe "set cedit=\<C-c>"
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
122 normal! :
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
123 call assert_equal(1, winnr('$'))
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
124
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
125 let g:cmd_wintype = ''
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
126 func CmdWinType()
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
127 let g:cmd_wintype = getcmdwintype()
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
128 let g:wintype = win_gettype()
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
129 return ''
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
130 endfunc
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
131
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
132 call feedkeys("\<C-c>a\<C-R>=CmdWinType()\<CR>\<CR>")
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
133 echo input('')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
134 call assert_equal('@', g:cmd_wintype)
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
135 call assert_equal('command', g:wintype)
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
136
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
137 set cedit&vim
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
138 delfunc CmdWinType
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
139 endfunc
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
140
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
141 " Test for CmdwinEnter autocmd
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
142 func Test_cmdwin_autocmd()
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
143 augroup CmdWin
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
144 au!
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
145 autocmd BufLeave * if &buftype == '' | update | endif
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
146 autocmd CmdwinEnter * startinsert
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
147 augroup END
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
148
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
149 call assert_fails('call feedkeys("q:xyz\<CR>", "xt")', 'E492:')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
150 call assert_equal('xyz', @:)
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
151
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
152 augroup CmdWin
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
153 au!
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
154 augroup END
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
155 augroup! CmdWin
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
156 endfunc
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
157
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
158 func Test_cmdwin_jump_to_win()
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
159 call assert_fails('call feedkeys("q:\<C-W>\<C-W>\<CR>", "xt")', 'E11:')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
160 new
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
161 set modified
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
162 call assert_fails('call feedkeys("q/:qall\<CR>", "xt")', ['E37:', 'E162:'])
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
163 close!
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
164 call feedkeys("q/:close\<CR>", "xt")
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
165 call assert_equal(1, winnr('$'))
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
166 call feedkeys("q/:exit\<CR>", "xt")
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
167 call assert_equal(1, winnr('$'))
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
168
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
169 " opening command window twice should fail
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
170 call assert_beeps('call feedkeys("q:q:\<CR>\<CR>", "xt")')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
171 call assert_equal(1, winnr('$'))
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
172 endfunc
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
173
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
174 func Test_cmdwin_tabpage()
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
175 tabedit
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
176 call assert_fails("silent norm q/g :I\<Esc>", 'E11:')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
177 tabclose!
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
178 endfunc
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
179
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
180 func Test_cmdwin_interrupted()
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
181 CheckScreendump
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
182
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
183 " aborting the :smile output caused the cmdline window to use the current
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
184 " buffer.
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
185 let lines =<< trim [SCRIPT]
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
186 au WinNew * smile
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
187 [SCRIPT]
30164
f7a2de8a4ddc patch 9.0.0418: manually deleting temp test files
Bram Moolenaar <Bram@vim.org>
parents: 29820
diff changeset
188 call writefile(lines, 'XTest_cmdwin', 'D')
29369
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
189
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
190 let buf = RunVimInTerminal('-S XTest_cmdwin', {'rows': 18})
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
191 " open cmdwin
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
192 call term_sendkeys(buf, "q:")
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
193 call WaitForAssert({-> assert_match('-- More --', term_getline(buf, 18))})
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
194 " quit more prompt for :smile command
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
195 call term_sendkeys(buf, "q")
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
196 call WaitForAssert({-> assert_match('^$', term_getline(buf, 18))})
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
197 " execute a simple command
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
198 call term_sendkeys(buf, "aecho 'done'\<CR>")
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
199 call VerifyScreenDump(buf, 'Test_cmdwin_interrupted', {})
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
200
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
201 " clean up
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
202 call StopVimInTerminal(buf)
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
203 endfunc
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
204
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
205 " Test for recursively getting multiple command line inputs
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
206 func Test_cmdwin_multi_input()
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
207 call feedkeys(":\<C-R>=input('P: ')\<CR>\"cyan\<CR>\<CR>", 'xt')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
208 call assert_equal('"cyan', @:)
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
209 endfunc
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
210
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
211 " Test for normal mode commands not supported in the cmd window
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
212 func Test_cmdwin_blocked_commands()
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
213 call assert_fails('call feedkeys("q:\<C-T>\<CR>", "xt")', 'E11:')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
214 call assert_fails('call feedkeys("q:\<C-]>\<CR>", "xt")', 'E11:')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
215 call assert_fails('call feedkeys("q:\<C-^>\<CR>", "xt")', 'E11:')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
216 call assert_fails('call feedkeys("q:Q\<CR>", "xt")', 'E11:')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
217 call assert_fails('call feedkeys("q:Z\<CR>", "xt")', 'E11:')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
218 call assert_fails('call feedkeys("q:\<F1>\<CR>", "xt")', 'E11:')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
219 call assert_fails('call feedkeys("q:\<C-W>s\<CR>", "xt")', 'E11:')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
220 call assert_fails('call feedkeys("q:\<C-W>v\<CR>", "xt")', 'E11:')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
221 call assert_fails('call feedkeys("q:\<C-W>^\<CR>", "xt")', 'E11:')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
222 call assert_fails('call feedkeys("q:\<C-W>n\<CR>", "xt")', 'E11:')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
223 call assert_fails('call feedkeys("q:\<C-W>z\<CR>", "xt")', 'E11:')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
224 call assert_fails('call feedkeys("q:\<C-W>o\<CR>", "xt")', 'E11:')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
225 call assert_fails('call feedkeys("q:\<C-W>w\<CR>", "xt")', 'E11:')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
226 call assert_fails('call feedkeys("q:\<C-W>j\<CR>", "xt")', 'E11:')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
227 call assert_fails('call feedkeys("q:\<C-W>k\<CR>", "xt")', 'E11:')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
228 call assert_fails('call feedkeys("q:\<C-W>h\<CR>", "xt")', 'E11:')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
229 call assert_fails('call feedkeys("q:\<C-W>l\<CR>", "xt")', 'E11:')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
230 call assert_fails('call feedkeys("q:\<C-W>T\<CR>", "xt")', 'E11:')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
231 call assert_fails('call feedkeys("q:\<C-W>x\<CR>", "xt")', 'E11:')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
232 call assert_fails('call feedkeys("q:\<C-W>r\<CR>", "xt")', 'E11:')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
233 call assert_fails('call feedkeys("q:\<C-W>R\<CR>", "xt")', 'E11:')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
234 call assert_fails('call feedkeys("q:\<C-W>K\<CR>", "xt")', 'E11:')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
235 call assert_fails('call feedkeys("q:\<C-W>}\<CR>", "xt")', 'E11:')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
236 call assert_fails('call feedkeys("q:\<C-W>]\<CR>", "xt")', 'E11:')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
237 call assert_fails('call feedkeys("q:\<C-W>f\<CR>", "xt")', 'E11:')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
238 call assert_fails('call feedkeys("q:\<C-W>d\<CR>", "xt")', 'E11:')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
239 call assert_fails('call feedkeys("q:\<C-W>g\<CR>", "xt")', 'E11:')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
240 endfunc
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
241
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
242 " Close the Cmd-line window in insert mode using CTRL-C
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
243 func Test_cmdwin_insert_mode_close()
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
244 %bw!
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
245 let s = ''
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
246 exe "normal q:a\<C-C>let s='Hello'\<CR>"
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
247 call assert_equal('Hello', s)
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
248 call assert_equal(1, winnr('$'))
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
249 endfunc
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
250
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
251 func Test_cmdwin_ex_mode_with_modifier()
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
252 " this was accessing memory after allocated text in Ex mode
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
253 new
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
254 call setline(1, ['some', 'text', 'lines'])
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
255 silent! call feedkeys("gQnormal vq:atopleft\<C-V>\<CR>\<CR>", 'xt')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
256 bwipe!
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
257 endfunc
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
258
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
259 func s:ComplInCmdwin_GlobalCompletion(a, l, p)
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
260 return 'global'
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
261 endfunc
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
262
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
263 func s:ComplInCmdwin_LocalCompletion(a, l, p)
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
264 return 'local'
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
265 endfunc
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
266
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
267 func Test_compl_in_cmdwin()
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
268 set wildmenu wildchar=<Tab>
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
269 com! -nargs=1 -complete=command GetInput let input = <q-args>
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
270 com! -buffer TestCommand echo 'TestCommand'
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
271 let w:test_winvar = 'winvar'
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
272 let b:test_bufvar = 'bufvar'
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
273
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
274 " User-defined commands
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
275 let input = ''
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
276 call feedkeys("q:iGetInput T\<C-x>\<C-v>\<CR>", 'tx!')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
277 call assert_equal('TestCommand', input)
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
278
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
279 let input = ''
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
280 call feedkeys("q::GetInput T\<Tab>\<CR>:q\<CR>", 'tx!')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
281 call assert_equal('T', input)
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
282
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
283
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
284 com! -nargs=1 -complete=var GetInput let input = <q-args>
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
285 " Window-local variables
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
286 let input = ''
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
287 call feedkeys("q:iGetInput w:test_\<C-x>\<C-v>\<CR>", 'tx!')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
288 call assert_equal('w:test_winvar', input)
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
289
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
290 let input = ''
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
291 call feedkeys("q::GetInput w:test_\<Tab>\<CR>:q\<CR>", 'tx!')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
292 call assert_equal('w:test_', input)
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
293
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
294 " Buffer-local variables
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
295 let input = ''
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
296 call feedkeys("q:iGetInput b:test_\<C-x>\<C-v>\<CR>", 'tx!')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
297 call assert_equal('b:test_bufvar', input)
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
298
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
299 let input = ''
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
300 call feedkeys("q::GetInput b:test_\<Tab>\<CR>:q\<CR>", 'tx!')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
301 call assert_equal('b:test_', input)
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
302
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
303
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
304 " Argument completion of buffer-local command
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
305 func s:ComplInCmdwin_GlobalCompletionList(a, l, p)
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
306 return ['global']
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
307 endfunc
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
308
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
309 func s:ComplInCmdwin_LocalCompletionList(a, l, p)
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
310 return ['local']
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
311 endfunc
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
312
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
313 func s:ComplInCmdwin_CheckCompletion(arg)
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
314 call assert_equal('local', a:arg)
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
315 endfunc
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
316
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
317 com! -nargs=1 -complete=custom,<SID>ComplInCmdwin_GlobalCompletion
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
318 \ TestCommand call s:ComplInCmdwin_CheckCompletion(<q-args>)
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
319 com! -buffer -nargs=1 -complete=custom,<SID>ComplInCmdwin_LocalCompletion
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
320 \ TestCommand call s:ComplInCmdwin_CheckCompletion(<q-args>)
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
321 call feedkeys("q:iTestCommand \<Tab>\<CR>", 'tx!')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
322
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
323 com! -nargs=1 -complete=customlist,<SID>ComplInCmdwin_GlobalCompletionList
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
324 \ TestCommand call s:ComplInCmdwin_CheckCompletion(<q-args>)
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
325 com! -buffer -nargs=1 -complete=customlist,<SID>ComplInCmdwin_LocalCompletionList
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
326 \ TestCommand call s:ComplInCmdwin_CheckCompletion(<q-args>)
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
327
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
328 call feedkeys("q:iTestCommand \<Tab>\<CR>", 'tx!')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
329
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
330 func! s:ComplInCmdwin_CheckCompletion(arg)
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
331 call assert_equal('global', a:arg)
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
332 endfunc
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
333 new
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
334 call feedkeys("q:iTestCommand \<Tab>\<CR>", 'tx!')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
335 quit
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
336
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
337 delfunc s:ComplInCmdwin_GlobalCompletion
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
338 delfunc s:ComplInCmdwin_LocalCompletion
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
339 delfunc s:ComplInCmdwin_GlobalCompletionList
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
340 delfunc s:ComplInCmdwin_LocalCompletionList
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
341 delfunc s:ComplInCmdwin_CheckCompletion
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
342
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
343 delcom -buffer TestCommand
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
344 delcom TestCommand
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
345 delcom GetInput
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
346 unlet w:test_winvar
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
347 unlet b:test_bufvar
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
348 set wildmenu& wildchar&
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
349 endfunc
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
350
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
351 func Test_cmdwin_ctrl_bsl()
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
352 " Using CTRL-\ CTRL-N in cmd window should close the window
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
353 call feedkeys("q:\<C-\>\<C-N>", 'xt')
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
354 call assert_equal('', getcmdwintype())
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
355 endfunc
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
356
29444
44bb4a607125 patch 9.0.0064: confusing error when using "q:" in command line window
Bram Moolenaar <Bram@vim.org>
parents: 29369
diff changeset
357 func Test_cant_open_cmdwin_in_cmdwin()
44bb4a607125 patch 9.0.0064: confusing error when using "q:" in command line window
Bram Moolenaar <Bram@vim.org>
parents: 29369
diff changeset
358 try
44bb4a607125 patch 9.0.0064: confusing error when using "q:" in command line window
Bram Moolenaar <Bram@vim.org>
parents: 29369
diff changeset
359 call feedkeys("q:q::q\<CR>", "x!")
44bb4a607125 patch 9.0.0064: confusing error when using "q:" in command line window
Bram Moolenaar <Bram@vim.org>
parents: 29369
diff changeset
360 catch
44bb4a607125 patch 9.0.0064: confusing error when using "q:" in command line window
Bram Moolenaar <Bram@vim.org>
parents: 29369
diff changeset
361 let caught = v:exception
44bb4a607125 patch 9.0.0064: confusing error when using "q:" in command line window
Bram Moolenaar <Bram@vim.org>
parents: 29369
diff changeset
362 endtry
44bb4a607125 patch 9.0.0064: confusing error when using "q:" in command line window
Bram Moolenaar <Bram@vim.org>
parents: 29369
diff changeset
363 call assert_match('E1292:', caught)
44bb4a607125 patch 9.0.0064: confusing error when using "q:" in command line window
Bram Moolenaar <Bram@vim.org>
parents: 29369
diff changeset
364 endfunc
44bb4a607125 patch 9.0.0064: confusing error when using "q:" in command line window
Bram Moolenaar <Bram@vim.org>
parents: 29369
diff changeset
365
29757
beab53bb989e patch 9.0.0218: reading before the start of the line
Bram Moolenaar <Bram@vim.org>
parents: 29444
diff changeset
366 func Test_cmdwin_virtual_edit()
beab53bb989e patch 9.0.0218: reading before the start of the line
Bram Moolenaar <Bram@vim.org>
parents: 29444
diff changeset
367 enew!
beab53bb989e patch 9.0.0218: reading before the start of the line
Bram Moolenaar <Bram@vim.org>
parents: 29444
diff changeset
368 set ve=all cpo+=$
beab53bb989e patch 9.0.0218: reading before the start of the line
Bram Moolenaar <Bram@vim.org>
parents: 29444
diff changeset
369 silent normal q/s
beab53bb989e patch 9.0.0218: reading before the start of the line
Bram Moolenaar <Bram@vim.org>
parents: 29444
diff changeset
370
beab53bb989e patch 9.0.0218: reading before the start of the line
Bram Moolenaar <Bram@vim.org>
parents: 29444
diff changeset
371 set ve= cpo-=$
beab53bb989e patch 9.0.0218: reading before the start of the line
Bram Moolenaar <Bram@vim.org>
parents: 29444
diff changeset
372 endfunc
beab53bb989e patch 9.0.0218: reading before the start of the line
Bram Moolenaar <Bram@vim.org>
parents: 29444
diff changeset
373
29820
8629106c4982 patch 9.0.0249: no test for what 9.0.0234 fixes
Bram Moolenaar <Bram@vim.org>
parents: 29757
diff changeset
374 " Check that a :normal command can be used to stop Visual mode without side
8629106c4982 patch 9.0.0249: no test for what 9.0.0234 fixes
Bram Moolenaar <Bram@vim.org>
parents: 29757
diff changeset
375 " effects.
8629106c4982 patch 9.0.0249: no test for what 9.0.0234 fixes
Bram Moolenaar <Bram@vim.org>
parents: 29757
diff changeset
376 func Test_normal_escape()
8629106c4982 patch 9.0.0249: no test for what 9.0.0234 fixes
Bram Moolenaar <Bram@vim.org>
parents: 29757
diff changeset
377 call feedkeys("q:i\" foo\<Esc>:normal! \<C-V>\<Esc>\<CR>:\" bar\<CR>", 'ntx')
8629106c4982 patch 9.0.0249: no test for what 9.0.0234 fixes
Bram Moolenaar <Bram@vim.org>
parents: 29757
diff changeset
378 call assert_equal('" bar', @:)
8629106c4982 patch 9.0.0249: no test for what 9.0.0234 fixes
Bram Moolenaar <Bram@vim.org>
parents: 29757
diff changeset
379 endfunc
8629106c4982 patch 9.0.0249: no test for what 9.0.0234 fixes
Bram Moolenaar <Bram@vim.org>
parents: 29757
diff changeset
380
30308
6b541aaaf39e patch 9.0.0490: using freed memory with cmdwin and BufEnter autocmd
Bram Moolenaar <Bram@vim.org>
parents: 30164
diff changeset
381 " This was using a pointer to a freed buffer
6b541aaaf39e patch 9.0.0490: using freed memory with cmdwin and BufEnter autocmd
Bram Moolenaar <Bram@vim.org>
parents: 30164
diff changeset
382 func Test_cmdwin_freed_buffer_ptr()
6b541aaaf39e patch 9.0.0490: using freed memory with cmdwin and BufEnter autocmd
Bram Moolenaar <Bram@vim.org>
parents: 30164
diff changeset
383 au BufEnter * next 0| file
6b541aaaf39e patch 9.0.0490: using freed memory with cmdwin and BufEnter autocmd
Bram Moolenaar <Bram@vim.org>
parents: 30164
diff changeset
384 edit 0
6b541aaaf39e patch 9.0.0490: using freed memory with cmdwin and BufEnter autocmd
Bram Moolenaar <Bram@vim.org>
parents: 30164
diff changeset
385 silent! norm q/
6b541aaaf39e patch 9.0.0490: using freed memory with cmdwin and BufEnter autocmd
Bram Moolenaar <Bram@vim.org>
parents: 30164
diff changeset
386
6b541aaaf39e patch 9.0.0490: using freed memory with cmdwin and BufEnter autocmd
Bram Moolenaar <Bram@vim.org>
parents: 30164
diff changeset
387 au! BufEnter
6b541aaaf39e patch 9.0.0490: using freed memory with cmdwin and BufEnter autocmd
Bram Moolenaar <Bram@vim.org>
parents: 30164
diff changeset
388 bwipe!
6b541aaaf39e patch 9.0.0490: using freed memory with cmdwin and BufEnter autocmd
Bram Moolenaar <Bram@vim.org>
parents: 30164
diff changeset
389 endfunc
6b541aaaf39e patch 9.0.0490: using freed memory with cmdwin and BufEnter autocmd
Bram Moolenaar <Bram@vim.org>
parents: 30164
diff changeset
390
29369
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
391
b1f345ec827e patch 9.0.0027: the command line test is getting quite big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
392 " vim: shiftwidth=2 sts=2 expandtab