Bram Moolenaar | 6d91bcb | 2020-08-12 18:50:36 +0200 | [diff] [blame] | 1 | " Test for 'iminsert' |
| 2 | |
Christian Brabandt | eb380b9 | 2025-07-07 20:53:55 +0200 | [diff] [blame] | 3 | import './util/vim9.vim' as v9 |
Bram Moolenaar | 6315a9a | 2017-11-25 15:20:02 +0100 | [diff] [blame] | 4 | |
| 5 | let s:imactivatefunc_called = 0 |
| 6 | let s:imstatusfunc_called = 0 |
Bram Moolenaar | a3a1246 | 2019-09-07 15:08:38 +0200 | [diff] [blame] | 7 | let s:imstatus_active = 0 |
Bram Moolenaar | 6315a9a | 2017-11-25 15:20:02 +0100 | [diff] [blame] | 8 | |
| 9 | func IM_activatefunc(active) |
| 10 | let s:imactivatefunc_called = 1 |
Bram Moolenaar | 845e0ee | 2020-06-20 16:05:32 +0200 | [diff] [blame] | 11 | let s:imstatus_active = a:active |
Bram Moolenaar | 6315a9a | 2017-11-25 15:20:02 +0100 | [diff] [blame] | 12 | endfunc |
| 13 | |
| 14 | func IM_statusfunc() |
| 15 | let s:imstatusfunc_called = 1 |
Bram Moolenaar | a3a1246 | 2019-09-07 15:08:38 +0200 | [diff] [blame] | 16 | return s:imstatus_active |
Bram Moolenaar | 6315a9a | 2017-11-25 15:20:02 +0100 | [diff] [blame] | 17 | endfunc |
| 18 | |
| 19 | func Test_iminsert2() |
Bram Moolenaar | a3a1246 | 2019-09-07 15:08:38 +0200 | [diff] [blame] | 20 | let s:imactivatefunc_called = 0 |
| 21 | let s:imstatusfunc_called = 0 |
| 22 | |
Bram Moolenaar | 6315a9a | 2017-11-25 15:20:02 +0100 | [diff] [blame] | 23 | set imactivatefunc=IM_activatefunc |
| 24 | set imstatusfunc=IM_statusfunc |
| 25 | set iminsert=2 |
| 26 | normal! i |
| 27 | set iminsert=0 |
| 28 | set imactivatefunc= |
| 29 | set imstatusfunc= |
Bram Moolenaar | 2877d33 | 2017-11-26 14:56:16 +0100 | [diff] [blame] | 30 | |
Bram Moolenaar | c19fd91 | 2020-07-02 20:59:05 +0200 | [diff] [blame] | 31 | let expected = (has('win32') && has('gui_running')) ? 0 : 1 |
Bram Moolenaar | 2877d33 | 2017-11-26 14:56:16 +0100 | [diff] [blame] | 32 | call assert_equal(expected, s:imactivatefunc_called) |
| 33 | call assert_equal(expected, s:imstatusfunc_called) |
Bram Moolenaar | 6315a9a | 2017-11-25 15:20:02 +0100 | [diff] [blame] | 34 | endfunc |
Bram Moolenaar | a3a1246 | 2019-09-07 15:08:38 +0200 | [diff] [blame] | 35 | |
Bram Moolenaar | e2a3f36 | 2019-12-07 21:40:48 +0100 | [diff] [blame] | 36 | func Test_getimstatus() |
| 37 | if has('win32') |
| 38 | CheckFeature multi_byte_ime |
Bram Moolenaar | be7529e | 2020-08-13 21:05:39 +0200 | [diff] [blame] | 39 | else |
Bram Moolenaar | e2a3f36 | 2019-12-07 21:40:48 +0100 | [diff] [blame] | 40 | CheckFeature xim |
| 41 | endif |
Bram Moolenaar | c19fd91 | 2020-07-02 20:59:05 +0200 | [diff] [blame] | 42 | if has('win32') && has('gui_running') |
Bram Moolenaar | a3a1246 | 2019-09-07 15:08:38 +0200 | [diff] [blame] | 43 | set imactivatefunc= |
| 44 | set imstatusfunc= |
| 45 | else |
| 46 | set imactivatefunc=IM_activatefunc |
| 47 | set imstatusfunc=IM_statusfunc |
| 48 | let s:imstatus_active = 0 |
| 49 | endif |
| 50 | |
| 51 | new |
| 52 | set iminsert=2 |
| 53 | call feedkeys("i\<C-R>=getimstatus()\<CR>\<ESC>", 'nx') |
| 54 | call assert_equal('1', getline(1)) |
| 55 | set iminsert=0 |
| 56 | call feedkeys("o\<C-R>=getimstatus()\<CR>\<ESC>", 'nx') |
| 57 | call assert_equal('0', getline(2)) |
| 58 | bw! |
| 59 | |
| 60 | set imactivatefunc= |
| 61 | set imstatusfunc= |
| 62 | endfunc |
Bram Moolenaar | 0546d7d | 2020-03-01 16:53:09 +0100 | [diff] [blame] | 63 | |
Milly | c7e54ef | 2022-05-26 13:16:25 +0100 | [diff] [blame] | 64 | func Test_imactivatefunc_imstatusfunc_callback_no_breaks_foldopen() |
| 65 | CheckScreendump |
| 66 | |
| 67 | let lines =<< trim END |
| 68 | func IM_activatefunc(active) |
| 69 | endfunc |
| 70 | func IM_statusfunc() |
| 71 | return 0 |
| 72 | endfunc |
| 73 | set imactivatefunc=IM_activatefunc |
| 74 | set imstatusfunc=IM_statusfunc |
| 75 | set foldmethod=marker |
| 76 | set foldopen=search |
| 77 | call setline(1, ['{{{', 'abc', '}}}']) |
| 78 | %foldclose |
| 79 | END |
Bram Moolenaar | 7dd5a78 | 2022-09-29 21:01:57 +0100 | [diff] [blame] | 80 | call writefile(lines, 'Xscript', 'D') |
Milly | c7e54ef | 2022-05-26 13:16:25 +0100 | [diff] [blame] | 81 | let buf = RunVimInTerminal('-S Xscript', {}) |
Milly | c7e54ef | 2022-05-26 13:16:25 +0100 | [diff] [blame] | 82 | call assert_notequal('abc', term_getline(buf, 2)) |
| 83 | call term_sendkeys(buf, "/abc\n") |
Bram Moolenaar | 37bb3b1 | 2022-06-21 17:40:47 +0100 | [diff] [blame] | 84 | call WaitForAssert({-> assert_equal('abc', term_getline(buf, 2))}) |
Milly | c7e54ef | 2022-05-26 13:16:25 +0100 | [diff] [blame] | 85 | |
| 86 | " clean up |
| 87 | call StopVimInTerminal(buf) |
Milly | c7e54ef | 2022-05-26 13:16:25 +0100 | [diff] [blame] | 88 | endfunc |
| 89 | |
Bram Moolenaar | 1671f44 | 2020-03-10 07:48:13 +0100 | [diff] [blame] | 90 | " Test for using an lmap in insert mode |
| 91 | func Test_lmap_in_insert_mode() |
| 92 | new |
| 93 | call setline(1, 'abc') |
| 94 | lmap { w |
| 95 | set iminsert=1 |
| 96 | call feedkeys('r{', 'xt') |
| 97 | call assert_equal('wbc', getline(1)) |
| 98 | set iminsert=2 |
| 99 | call feedkeys('$r{', 'xt') |
| 100 | call assert_equal('wb{', getline(1)) |
| 101 | call setline(1, 'vim web') |
| 102 | set iminsert=1 |
| 103 | call feedkeys('0f{', 'xt') |
| 104 | call assert_equal(5, col('.')) |
| 105 | set iminsert& |
| 106 | lunmap { |
| 107 | close! |
| 108 | endfunc |
| 109 | |
Bram Moolenaar | 845e0ee | 2020-06-20 16:05:32 +0200 | [diff] [blame] | 110 | " Test for using CTRL-^ to toggle iminsert in insert mode |
| 111 | func Test_iminsert_toggle() |
| 112 | CheckGui |
| 113 | if has('win32') |
| 114 | CheckFeature multi_byte_ime |
Bram Moolenaar | be7529e | 2020-08-13 21:05:39 +0200 | [diff] [blame] | 115 | else |
Bram Moolenaar | 845e0ee | 2020-06-20 16:05:32 +0200 | [diff] [blame] | 116 | CheckFeature xim |
| 117 | endif |
| 118 | if has('gui_running') && !has('win32') |
Bram Moolenaar | 6d91bcb | 2020-08-12 18:50:36 +0200 | [diff] [blame] | 119 | throw 'Skipped: works only in Win32 GUI version (for some reason)' |
Bram Moolenaar | 845e0ee | 2020-06-20 16:05:32 +0200 | [diff] [blame] | 120 | endif |
| 121 | new |
| 122 | let save_imdisable = &imdisable |
| 123 | let save_iminsert = &iminsert |
| 124 | set noimdisable |
| 125 | set iminsert=0 |
| 126 | exe "normal i\<C-^>" |
| 127 | call assert_equal(2, &iminsert) |
| 128 | exe "normal i\<C-^>" |
| 129 | call assert_equal(0, &iminsert) |
| 130 | let &iminsert = save_iminsert |
| 131 | let &imdisable = save_imdisable |
| 132 | close! |
| 133 | endfunc |
| 134 | |
Yegappan Lakshmanan | 7645da5 | 2021-12-04 14:02:30 +0000 | [diff] [blame] | 135 | " Test for different ways of setting the 'imactivatefunc' and 'imstatusfunc' |
| 136 | " options |
| 137 | func Test_imactivatefunc_imstatusfunc_callback() |
| 138 | CheckNotMSWindows |
| 139 | func IMactivatefunc1(active) |
| 140 | let g:IMactivatefunc_called += 1 |
| 141 | endfunc |
| 142 | func IMstatusfunc1() |
| 143 | let g:IMstatusfunc_called += 1 |
| 144 | return 1 |
| 145 | endfunc |
Yegappan Lakshmanan | 7645da5 | 2021-12-04 14:02:30 +0000 | [diff] [blame] | 146 | set iminsert=2 |
| 147 | |
Yegappan Lakshmanan | 6ae8fae | 2021-12-12 16:26:44 +0000 | [diff] [blame] | 148 | let lines =<< trim END |
| 149 | LET g:IMactivatefunc_called = 0 |
| 150 | LET g:IMstatusfunc_called = 0 |
Yegappan Lakshmanan | 7645da5 | 2021-12-04 14:02:30 +0000 | [diff] [blame] | 151 | |
Yegappan Lakshmanan | 04ef1fb | 2021-12-12 20:08:05 +0000 | [diff] [blame] | 152 | #" Test for using a function name |
| 153 | LET &imactivatefunc = 'g:IMactivatefunc1' |
| 154 | LET &imstatusfunc = 'g:IMstatusfunc1' |
| 155 | normal! i |
| 156 | |
Yegappan Lakshmanan | 6ae8fae | 2021-12-12 16:26:44 +0000 | [diff] [blame] | 157 | #" Test for using a function() |
| 158 | set imactivatefunc=function('g:IMactivatefunc1') |
| 159 | set imstatusfunc=function('g:IMstatusfunc1') |
| 160 | normal! i |
Yegappan Lakshmanan | 6409553 | 2021-12-06 11:03:55 +0000 | [diff] [blame] | 161 | |
Yegappan Lakshmanan | 6ae8fae | 2021-12-12 16:26:44 +0000 | [diff] [blame] | 162 | #" Using a funcref variable to set 'completefunc' |
| 163 | VAR Fn1 = function('g:IMactivatefunc1') |
| 164 | LET &imactivatefunc = Fn1 |
| 165 | VAR Fn2 = function('g:IMstatusfunc1') |
| 166 | LET &imstatusfunc = Fn2 |
| 167 | normal! i |
Yegappan Lakshmanan | 7645da5 | 2021-12-04 14:02:30 +0000 | [diff] [blame] | 168 | |
Yegappan Lakshmanan | 6ae8fae | 2021-12-12 16:26:44 +0000 | [diff] [blame] | 169 | #" Using a string(funcref variable) to set 'completefunc' |
| 170 | LET &imactivatefunc = string(Fn1) |
| 171 | LET &imstatusfunc = string(Fn2) |
| 172 | normal! i |
Yegappan Lakshmanan | 7645da5 | 2021-12-04 14:02:30 +0000 | [diff] [blame] | 173 | |
Yegappan Lakshmanan | 6ae8fae | 2021-12-12 16:26:44 +0000 | [diff] [blame] | 174 | #" Test for using a funcref() |
| 175 | set imactivatefunc=funcref('g:IMactivatefunc1') |
| 176 | set imstatusfunc=funcref('g:IMstatusfunc1') |
| 177 | normal! i |
Yegappan Lakshmanan | 6409553 | 2021-12-06 11:03:55 +0000 | [diff] [blame] | 178 | |
Yegappan Lakshmanan | 6ae8fae | 2021-12-12 16:26:44 +0000 | [diff] [blame] | 179 | #" Using a funcref variable to set 'imactivatefunc' |
| 180 | LET Fn1 = funcref('g:IMactivatefunc1') |
| 181 | LET &imactivatefunc = Fn1 |
| 182 | LET Fn2 = funcref('g:IMstatusfunc1') |
| 183 | LET &imstatusfunc = Fn2 |
| 184 | normal! i |
Yegappan Lakshmanan | 7645da5 | 2021-12-04 14:02:30 +0000 | [diff] [blame] | 185 | |
Yegappan Lakshmanan | 6ae8fae | 2021-12-12 16:26:44 +0000 | [diff] [blame] | 186 | #" Using a string(funcref variable) to set 'imactivatefunc' |
| 187 | LET &imactivatefunc = string(Fn1) |
| 188 | LET &imstatusfunc = string(Fn2) |
| 189 | normal! i |
Yegappan Lakshmanan | 7645da5 | 2021-12-04 14:02:30 +0000 | [diff] [blame] | 190 | |
Yegappan Lakshmanan | 6ae8fae | 2021-12-12 16:26:44 +0000 | [diff] [blame] | 191 | #" Test for using a lambda function |
Bram Moolenaar | 62aec93 | 2022-01-29 21:45:34 +0000 | [diff] [blame] | 192 | VAR optval = "LSTART a LMIDDLE g:IMactivatefunc1(a) LEND" |
Yegappan Lakshmanan | 6ae8fae | 2021-12-12 16:26:44 +0000 | [diff] [blame] | 193 | LET optval = substitute(optval, ' ', '\\ ', 'g') |
| 194 | exe "set imactivatefunc=" .. optval |
Bram Moolenaar | 62aec93 | 2022-01-29 21:45:34 +0000 | [diff] [blame] | 195 | LET optval = "LSTART LMIDDLE g:IMstatusfunc1() LEND" |
Yegappan Lakshmanan | 6ae8fae | 2021-12-12 16:26:44 +0000 | [diff] [blame] | 196 | LET optval = substitute(optval, ' ', '\\ ', 'g') |
| 197 | exe "set imstatusfunc=" .. optval |
| 198 | normal! i |
Yegappan Lakshmanan | 6409553 | 2021-12-06 11:03:55 +0000 | [diff] [blame] | 199 | |
Yegappan Lakshmanan | 6ae8fae | 2021-12-12 16:26:44 +0000 | [diff] [blame] | 200 | #" Set 'imactivatefunc' and 'imstatusfunc' to a lambda expression |
Bram Moolenaar | 62aec93 | 2022-01-29 21:45:34 +0000 | [diff] [blame] | 201 | LET &imactivatefunc = LSTART a LMIDDLE g:IMactivatefunc1(a) LEND |
| 202 | LET &imstatusfunc = LSTART LMIDDLE g:IMstatusfunc1() LEND |
Yegappan Lakshmanan | 6ae8fae | 2021-12-12 16:26:44 +0000 | [diff] [blame] | 203 | normal! i |
Yegappan Lakshmanan | 7645da5 | 2021-12-04 14:02:30 +0000 | [diff] [blame] | 204 | |
Yegappan Lakshmanan | 6ae8fae | 2021-12-12 16:26:44 +0000 | [diff] [blame] | 205 | #" Set 'imactivatefunc' and 'imstatusfunc' to a string(lambda expression) |
Bram Moolenaar | 62aec93 | 2022-01-29 21:45:34 +0000 | [diff] [blame] | 206 | LET &imactivatefunc = 'LSTART a LMIDDLE g:IMactivatefunc1(a) LEND' |
| 207 | LET &imstatusfunc = 'LSTART LMIDDLE g:IMstatusfunc1() LEND' |
Yegappan Lakshmanan | 6ae8fae | 2021-12-12 16:26:44 +0000 | [diff] [blame] | 208 | normal! i |
Yegappan Lakshmanan | 6409553 | 2021-12-06 11:03:55 +0000 | [diff] [blame] | 209 | |
Yegappan Lakshmanan | 6ae8fae | 2021-12-12 16:26:44 +0000 | [diff] [blame] | 210 | #" Set 'imactivatefunc' 'imstatusfunc' to a variable with a lambda |
| 211 | #" expression |
Bram Moolenaar | 62aec93 | 2022-01-29 21:45:34 +0000 | [diff] [blame] | 212 | VAR Lambda1 = LSTART a LMIDDLE g:IMactivatefunc1(a) LEND |
| 213 | VAR Lambda2 = LSTART LMIDDLE g:IMstatusfunc1() LEND |
Yegappan Lakshmanan | 6ae8fae | 2021-12-12 16:26:44 +0000 | [diff] [blame] | 214 | LET &imactivatefunc = Lambda1 |
| 215 | LET &imstatusfunc = Lambda2 |
| 216 | normal! i |
Yegappan Lakshmanan | 7645da5 | 2021-12-04 14:02:30 +0000 | [diff] [blame] | 217 | |
Yegappan Lakshmanan | 6ae8fae | 2021-12-12 16:26:44 +0000 | [diff] [blame] | 218 | #" Set 'imactivatefunc' 'imstatusfunc' to a string(variable with a lambda |
| 219 | #" expression) |
| 220 | LET &imactivatefunc = string(Lambda1) |
| 221 | LET &imstatusfunc = string(Lambda2) |
| 222 | normal! i |
Yegappan Lakshmanan | 7645da5 | 2021-12-04 14:02:30 +0000 | [diff] [blame] | 223 | |
Yegappan Lakshmanan | 6ae8fae | 2021-12-12 16:26:44 +0000 | [diff] [blame] | 224 | #" Test for clearing the 'completefunc' option |
| 225 | set imactivatefunc='' imstatusfunc='' |
| 226 | set imactivatefunc& imstatusfunc& |
Yegappan Lakshmanan | 7645da5 | 2021-12-04 14:02:30 +0000 | [diff] [blame] | 227 | |
Yegappan Lakshmanan | 6ae8fae | 2021-12-12 16:26:44 +0000 | [diff] [blame] | 228 | set imactivatefunc=g:IMactivatefunc1 |
| 229 | set imstatusfunc=g:IMstatusfunc1 |
| 230 | call assert_fails("set imactivatefunc=function('abc')", "E700:") |
| 231 | call assert_fails("set imstatusfunc=function('abc')", "E700:") |
| 232 | call assert_fails("set imactivatefunc=funcref('abc')", "E700:") |
| 233 | call assert_fails("set imstatusfunc=funcref('abc')", "E700:") |
| 234 | call assert_fails("LET &imstatusfunc = function('abc')", "E700:") |
| 235 | call assert_fails("LET &imactivatefunc = function('abc')", "E700:") |
| 236 | normal! i |
| 237 | |
| 238 | #" set 'imactivatefunc' and 'imstatusfunc' to a non-existing function |
| 239 | set imactivatefunc=IMactivatefunc1 |
| 240 | set imstatusfunc=IMstatusfunc1 |
| 241 | call assert_fails("set imactivatefunc=function('NonExistingFunc')", 'E700:') |
| 242 | call assert_fails("set imstatusfunc=function('NonExistingFunc')", 'E700:') |
| 243 | call assert_fails("LET &imactivatefunc = function('NonExistingFunc')", 'E700:') |
| 244 | call assert_fails("LET &imstatusfunc = function('NonExistingFunc')", 'E700:') |
| 245 | normal! i |
| 246 | |
Yegappan Lakshmanan | 04ef1fb | 2021-12-12 20:08:05 +0000 | [diff] [blame] | 247 | call assert_equal(14, g:IMactivatefunc_called) |
| 248 | call assert_equal(28, g:IMstatusfunc_called) |
Yegappan Lakshmanan | 6ae8fae | 2021-12-12 16:26:44 +0000 | [diff] [blame] | 249 | END |
Bram Moolenaar | 62aec93 | 2022-01-29 21:45:34 +0000 | [diff] [blame] | 250 | call v9.CheckLegacyAndVim9Success(lines) |
Yegappan Lakshmanan | 6ae8fae | 2021-12-12 16:26:44 +0000 | [diff] [blame] | 251 | |
| 252 | " Using Vim9 lambda expression in legacy context should fail |
| 253 | set imactivatefunc=(a)\ =>\ IMactivatefunc1(a) |
| 254 | set imstatusfunc=IMstatusfunc1 |
| 255 | call assert_fails('normal! i', 'E117:') |
| 256 | set imactivatefunc=IMactivatefunc1 |
| 257 | set imstatusfunc=()\ =>\ IMstatusfunc1(a) |
| 258 | call assert_fails('normal! i', 'E117:') |
| 259 | |
| 260 | " set 'imactivatefunc' and 'imstatusfunc' to a partial with dict. This used |
| 261 | " to cause a crash. |
| 262 | func SetIMFunc() |
| 263 | let params1 = {'activate': function('g:DictActivateFunc')} |
| 264 | let params2 = {'status': function('g:DictStatusFunc')} |
| 265 | let &imactivatefunc = params1.activate |
| 266 | let &imstatusfunc = params2.status |
| 267 | endfunc |
| 268 | func g:DictActivateFunc(_) dict |
| 269 | endfunc |
| 270 | func g:DictStatusFunc(_) dict |
| 271 | endfunc |
| 272 | call SetIMFunc() |
| 273 | new |
| 274 | call SetIMFunc() |
| 275 | bw |
| 276 | call test_garbagecollect_now() |
| 277 | new |
| 278 | set imactivatefunc= |
| 279 | set imstatusfunc= |
| 280 | wincmd w |
| 281 | set imactivatefunc= |
| 282 | set imstatusfunc= |
| 283 | :%bw! |
| 284 | delfunc g:DictActivateFunc |
| 285 | delfunc g:DictStatusFunc |
| 286 | delfunc SetIMFunc |
Yegappan Lakshmanan | 7645da5 | 2021-12-04 14:02:30 +0000 | [diff] [blame] | 287 | |
| 288 | " Vim9 tests |
| 289 | let lines =<< trim END |
| 290 | vim9script |
| 291 | |
| 292 | # Test for using function() |
| 293 | def IMactivatefunc1(active: number): any |
| 294 | g:IMactivatefunc_called += 1 |
| 295 | return 1 |
| 296 | enddef |
| 297 | def IMstatusfunc1(): number |
| 298 | g:IMstatusfunc_called += 1 |
| 299 | return 1 |
| 300 | enddef |
| 301 | g:IMactivatefunc_called = 0 |
| 302 | g:IMstatusfunc_called = 0 |
| 303 | set iminsert=2 |
| 304 | set imactivatefunc=function('IMactivatefunc1') |
| 305 | set imstatusfunc=function('IMstatusfunc1') |
| 306 | normal! i |
| 307 | |
Yegappan Lakshmanan | 7645da5 | 2021-12-04 14:02:30 +0000 | [diff] [blame] | 308 | set iminsert=0 |
| 309 | set imactivatefunc= |
| 310 | set imstatusfunc= |
| 311 | END |
Bram Moolenaar | 62aec93 | 2022-01-29 21:45:34 +0000 | [diff] [blame] | 312 | call v9.CheckScriptSuccess(lines) |
Yegappan Lakshmanan | 7645da5 | 2021-12-04 14:02:30 +0000 | [diff] [blame] | 313 | |
Yegappan Lakshmanan | 7645da5 | 2021-12-04 14:02:30 +0000 | [diff] [blame] | 314 | " cleanup |
Yegappan Lakshmanan | 04ef1fb | 2021-12-12 20:08:05 +0000 | [diff] [blame] | 315 | set iminsert=0 |
| 316 | set imactivatefunc& |
| 317 | set imstatusfunc& |
Yegappan Lakshmanan | 7645da5 | 2021-12-04 14:02:30 +0000 | [diff] [blame] | 318 | delfunc IMactivatefunc1 |
| 319 | delfunc IMstatusfunc1 |
Yegappan Lakshmanan | 04ef1fb | 2021-12-12 20:08:05 +0000 | [diff] [blame] | 320 | unlet g:IMactivatefunc_called g:IMstatusfunc_called |
Yegappan Lakshmanan | 7645da5 | 2021-12-04 14:02:30 +0000 | [diff] [blame] | 321 | %bw! |
| 322 | endfunc |
| 323 | |
Bram Moolenaar | 0546d7d | 2020-03-01 16:53:09 +0100 | [diff] [blame] | 324 | " vim: shiftwidth=2 sts=2 expandtab |