Bram Moolenaar | 72defda | 2016-01-17 18:04:33 +0100 | [diff] [blame] | 1 | " Test argument list commands |
| 2 | |
| 3 | func Test_argidx() |
| 4 | args a b c |
| 5 | last |
| 6 | call assert_equal(2, argidx()) |
| 7 | %argdelete |
| 8 | call assert_equal(0, argidx()) |
Bram Moolenaar | 69a92fb | 2017-03-09 15:58:30 +0100 | [diff] [blame] | 9 | " doing it again doesn't result in an error |
| 10 | %argdelete |
| 11 | call assert_equal(0, argidx()) |
| 12 | call assert_fails('2argdelete', 'E16:') |
Bram Moolenaar | 72defda | 2016-01-17 18:04:33 +0100 | [diff] [blame] | 13 | |
| 14 | args a b c |
| 15 | call assert_equal(0, argidx()) |
| 16 | next |
| 17 | call assert_equal(1, argidx()) |
| 18 | next |
| 19 | call assert_equal(2, argidx()) |
| 20 | 1argdelete |
| 21 | call assert_equal(1, argidx()) |
| 22 | 1argdelete |
| 23 | call assert_equal(0, argidx()) |
| 24 | 1argdelete |
| 25 | call assert_equal(0, argidx()) |
| 26 | endfunc |
Bram Moolenaar | a24f0a5 | 2016-01-17 19:39:00 +0100 | [diff] [blame] | 27 | |
| 28 | func Test_argadd() |
| 29 | %argdelete |
| 30 | argadd a b c |
| 31 | call assert_equal(0, argidx()) |
| 32 | |
| 33 | %argdelete |
| 34 | argadd a |
| 35 | call assert_equal(0, argidx()) |
| 36 | argadd b c d |
| 37 | call assert_equal(0, argidx()) |
| 38 | |
| 39 | call Init_abc() |
| 40 | argadd x |
| 41 | call Assert_argc(['a', 'b', 'x', 'c']) |
| 42 | call assert_equal(1, argidx()) |
| 43 | |
| 44 | call Init_abc() |
| 45 | 0argadd x |
| 46 | call Assert_argc(['x', 'a', 'b', 'c']) |
| 47 | call assert_equal(2, argidx()) |
| 48 | |
| 49 | call Init_abc() |
| 50 | 1argadd x |
| 51 | call Assert_argc(['a', 'x', 'b', 'c']) |
| 52 | call assert_equal(2, argidx()) |
| 53 | |
| 54 | call Init_abc() |
| 55 | $argadd x |
| 56 | call Assert_argc(['a', 'b', 'c', 'x']) |
| 57 | call assert_equal(1, argidx()) |
| 58 | |
| 59 | call Init_abc() |
| 60 | $argadd x |
| 61 | +2argadd y |
| 62 | call Assert_argc(['a', 'b', 'c', 'x', 'y']) |
| 63 | call assert_equal(1, argidx()) |
Bram Moolenaar | 2faa29f | 2016-01-23 23:02:34 +0100 | [diff] [blame] | 64 | |
| 65 | %argd |
| 66 | edit d |
| 67 | arga |
Bram Moolenaar | 398ee73 | 2017-08-03 14:29:14 +0200 | [diff] [blame] | 68 | call assert_equal(1, len(argv())) |
| 69 | call assert_equal('d', get(argv(), 0, '')) |
| 70 | |
| 71 | %argd |
| 72 | edit some\ file |
| 73 | arga |
| 74 | call assert_equal(1, len(argv())) |
| 75 | call assert_equal('some file', get(argv(), 0, '')) |
Bram Moolenaar | 2faa29f | 2016-01-23 23:02:34 +0100 | [diff] [blame] | 76 | |
| 77 | %argd |
| 78 | new |
| 79 | arga |
Bram Moolenaar | 398ee73 | 2017-08-03 14:29:14 +0200 | [diff] [blame] | 80 | call assert_equal(0, len(argv())) |
Bram Moolenaar | a24f0a5 | 2016-01-17 19:39:00 +0100 | [diff] [blame] | 81 | endfunc |
| 82 | |
Bram Moolenaar | 32bbd00 | 2018-08-31 23:06:22 +0200 | [diff] [blame] | 83 | func Test_argadd_empty_curbuf() |
| 84 | new |
| 85 | let curbuf = bufnr('%') |
| 86 | call writefile(['test', 'Xargadd'], 'Xargadd') |
| 87 | " must not re-use the current buffer. |
| 88 | argadd Xargadd |
| 89 | call assert_equal(curbuf, bufnr('%')) |
| 90 | call assert_equal('', bufname('%')) |
| 91 | call assert_equal(1, line('$')) |
| 92 | rew |
| 93 | call assert_notequal(curbuf, bufnr('%')) |
| 94 | call assert_equal('Xargadd', bufname('%')) |
| 95 | call assert_equal(2, line('$')) |
| 96 | |
| 97 | %argd |
| 98 | bwipe! |
| 99 | endfunc |
| 100 | |
Bram Moolenaar | a24f0a5 | 2016-01-17 19:39:00 +0100 | [diff] [blame] | 101 | func Init_abc() |
| 102 | args a b c |
| 103 | next |
| 104 | endfunc |
| 105 | |
| 106 | func Assert_argc(l) |
| 107 | call assert_equal(len(a:l), argc()) |
| 108 | let i = 0 |
| 109 | while i < len(a:l) && i < argc() |
| 110 | call assert_equal(a:l[i], argv(i)) |
| 111 | let i += 1 |
| 112 | endwhile |
| 113 | endfunc |
Bram Moolenaar | 99dbe29 | 2016-01-19 13:07:23 +0100 | [diff] [blame] | 114 | |
| 115 | " Test for [count]argument and [count]argdelete commands |
| 116 | " Ported from the test_argument_count.in test script |
Bram Moolenaar | 8c34aa0 | 2017-03-16 22:52:32 +0100 | [diff] [blame] | 117 | func Test_argument() |
Bram Moolenaar | 99dbe29 | 2016-01-19 13:07:23 +0100 | [diff] [blame] | 118 | " Clean the argument list |
| 119 | arga a | %argd |
| 120 | |
| 121 | let save_hidden = &hidden |
| 122 | set hidden |
| 123 | |
| 124 | let g:buffers = [] |
| 125 | augroup TEST |
| 126 | au BufEnter * call add(buffers, expand('%:t')) |
| 127 | augroup END |
| 128 | |
| 129 | argadd a b c d |
| 130 | $argu |
| 131 | $-argu |
| 132 | -argu |
| 133 | 1argu |
| 134 | +2argu |
| 135 | |
| 136 | augroup TEST |
| 137 | au! |
| 138 | augroup END |
| 139 | |
| 140 | call assert_equal(['d', 'c', 'b', 'a', 'c'], g:buffers) |
| 141 | |
| 142 | redir => result |
Bram Moolenaar | 5d69da4 | 2018-04-20 22:01:41 +0200 | [diff] [blame] | 143 | args |
Bram Moolenaar | 99dbe29 | 2016-01-19 13:07:23 +0100 | [diff] [blame] | 144 | redir END |
Bram Moolenaar | 5d69da4 | 2018-04-20 22:01:41 +0200 | [diff] [blame] | 145 | call assert_equal('a b [c] d', trim(result)) |
Bram Moolenaar | 99dbe29 | 2016-01-19 13:07:23 +0100 | [diff] [blame] | 146 | |
| 147 | .argd |
| 148 | call assert_equal(['a', 'b', 'd'], argv()) |
| 149 | |
| 150 | -argd |
| 151 | call assert_equal(['a', 'd'], argv()) |
| 152 | |
| 153 | $argd |
| 154 | call assert_equal(['a'], argv()) |
| 155 | |
| 156 | 1arga c |
| 157 | 1arga b |
| 158 | $argu |
| 159 | $arga x |
| 160 | call assert_equal(['a', 'b', 'c', 'x'], argv()) |
| 161 | |
Bram Moolenaar | 3014170 | 2016-01-19 14:14:08 +0100 | [diff] [blame] | 162 | 0arga y |
| 163 | call assert_equal(['y', 'a', 'b', 'c', 'x'], argv()) |
Bram Moolenaar | 99dbe29 | 2016-01-19 13:07:23 +0100 | [diff] [blame] | 164 | |
| 165 | %argd |
| 166 | call assert_equal([], argv()) |
| 167 | |
| 168 | arga a b c d e f |
| 169 | 2,$-argd |
| 170 | call assert_equal(['a', 'f'], argv()) |
| 171 | |
| 172 | let &hidden = save_hidden |
| 173 | |
| 174 | " Setting argument list should fail when the current buffer has unsaved |
| 175 | " changes |
| 176 | %argd |
| 177 | enew! |
| 178 | set modified |
| 179 | call assert_fails('args x y z', 'E37:') |
| 180 | args! x y z |
| 181 | call assert_equal(['x', 'y', 'z'], argv()) |
| 182 | call assert_equal('x', expand('%:t')) |
| 183 | |
| 184 | last | enew | argu |
| 185 | call assert_equal('z', expand('%:t')) |
| 186 | |
| 187 | %argdelete |
| 188 | call assert_fails('argument', 'E163:') |
Bram Moolenaar | 8c34aa0 | 2017-03-16 22:52:32 +0100 | [diff] [blame] | 189 | endfunc |
Bram Moolenaar | 99dbe29 | 2016-01-19 13:07:23 +0100 | [diff] [blame] | 190 | |
Bram Moolenaar | 5d69da4 | 2018-04-20 22:01:41 +0200 | [diff] [blame] | 191 | func Test_list_arguments() |
| 192 | " Clean the argument list |
| 193 | arga a | %argd |
| 194 | |
| 195 | " four args half the screen width makes two lines with two columns |
| 196 | let aarg = repeat('a', &columns / 2 - 4) |
| 197 | let barg = repeat('b', &columns / 2 - 4) |
| 198 | let carg = repeat('c', &columns / 2 - 4) |
| 199 | let darg = repeat('d', &columns / 2 - 4) |
| 200 | exe 'argadd ' aarg barg carg darg |
| 201 | |
| 202 | redir => result |
| 203 | args |
| 204 | redir END |
| 205 | call assert_match('\[' . aarg . '] \+' . carg . '\n' . barg . ' \+' . darg, trim(result)) |
| 206 | |
| 207 | " if one arg is longer than half the screen make one column |
| 208 | exe 'argdel' aarg |
| 209 | let aarg = repeat('a', &columns / 2 + 2) |
| 210 | exe '0argadd' aarg |
| 211 | redir => result |
| 212 | args |
| 213 | redir END |
| 214 | call assert_match(aarg . '\n\[' . barg . ']\n' . carg . '\n' . darg, trim(result)) |
| 215 | |
| 216 | %argdelete |
| 217 | endfunc |
| 218 | |
Bram Moolenaar | 99dbe29 | 2016-01-19 13:07:23 +0100 | [diff] [blame] | 219 | " Test for 0argadd and 0argedit |
| 220 | " Ported from the test_argument_0count.in test script |
Bram Moolenaar | 8c34aa0 | 2017-03-16 22:52:32 +0100 | [diff] [blame] | 221 | func Test_zero_argadd() |
Bram Moolenaar | 99dbe29 | 2016-01-19 13:07:23 +0100 | [diff] [blame] | 222 | " Clean the argument list |
| 223 | arga a | %argd |
| 224 | |
| 225 | arga a b c d |
| 226 | 2argu |
| 227 | 0arga added |
| 228 | call assert_equal(['added', 'a', 'b', 'c', 'd'], argv()) |
| 229 | |
| 230 | 2argu |
| 231 | arga third |
| 232 | call assert_equal(['added', 'a', 'third', 'b', 'c', 'd'], argv()) |
| 233 | |
| 234 | %argd |
| 235 | arga a b c d |
| 236 | 2argu |
| 237 | 0arge edited |
| 238 | call assert_equal(['edited', 'a', 'b', 'c', 'd'], argv()) |
| 239 | |
| 240 | 2argu |
| 241 | arga third |
| 242 | call assert_equal(['edited', 'a', 'third', 'b', 'c', 'd'], argv()) |
Bram Moolenaar | 90305c6 | 2017-07-16 15:31:17 +0200 | [diff] [blame] | 243 | |
| 244 | 2argu |
| 245 | argedit file\ with\ spaces another file |
| 246 | call assert_equal(['edited', 'a', 'file with spaces', 'another', 'file', 'third', 'b', 'c', 'd'], argv()) |
| 247 | call assert_equal('file with spaces', expand('%')) |
Bram Moolenaar | 8c34aa0 | 2017-03-16 22:52:32 +0100 | [diff] [blame] | 248 | endfunc |
Bram Moolenaar | 99dbe29 | 2016-01-19 13:07:23 +0100 | [diff] [blame] | 249 | |
Bram Moolenaar | 8c34aa0 | 2017-03-16 22:52:32 +0100 | [diff] [blame] | 250 | func Reset_arglist() |
Bram Moolenaar | 99dbe29 | 2016-01-19 13:07:23 +0100 | [diff] [blame] | 251 | args a | %argd |
Bram Moolenaar | 8c34aa0 | 2017-03-16 22:52:32 +0100 | [diff] [blame] | 252 | endfunc |
Bram Moolenaar | 99dbe29 | 2016-01-19 13:07:23 +0100 | [diff] [blame] | 253 | |
| 254 | " Test for argc() |
Bram Moolenaar | 8c34aa0 | 2017-03-16 22:52:32 +0100 | [diff] [blame] | 255 | func Test_argc() |
Bram Moolenaar | 99dbe29 | 2016-01-19 13:07:23 +0100 | [diff] [blame] | 256 | call Reset_arglist() |
| 257 | call assert_equal(0, argc()) |
| 258 | argadd a b |
| 259 | call assert_equal(2, argc()) |
Bram Moolenaar | 8c34aa0 | 2017-03-16 22:52:32 +0100 | [diff] [blame] | 260 | endfunc |
Bram Moolenaar | 99dbe29 | 2016-01-19 13:07:23 +0100 | [diff] [blame] | 261 | |
| 262 | " Test for arglistid() |
Bram Moolenaar | 8c34aa0 | 2017-03-16 22:52:32 +0100 | [diff] [blame] | 263 | func Test_arglistid() |
Bram Moolenaar | 99dbe29 | 2016-01-19 13:07:23 +0100 | [diff] [blame] | 264 | call Reset_arglist() |
| 265 | arga a b |
| 266 | call assert_equal(0, arglistid()) |
| 267 | split |
| 268 | arglocal |
| 269 | call assert_equal(1, arglistid()) |
| 270 | tabnew | tabfirst |
| 271 | call assert_equal(0, arglistid(2)) |
| 272 | call assert_equal(1, arglistid(1, 1)) |
| 273 | call assert_equal(0, arglistid(2, 1)) |
| 274 | call assert_equal(1, arglistid(1, 2)) |
| 275 | tabonly | only | enew! |
| 276 | argglobal |
| 277 | call assert_equal(0, arglistid()) |
Bram Moolenaar | 8c34aa0 | 2017-03-16 22:52:32 +0100 | [diff] [blame] | 278 | endfunc |
Bram Moolenaar | 99dbe29 | 2016-01-19 13:07:23 +0100 | [diff] [blame] | 279 | |
| 280 | " Test for argv() |
Bram Moolenaar | 8c34aa0 | 2017-03-16 22:52:32 +0100 | [diff] [blame] | 281 | func Test_argv() |
Bram Moolenaar | 99dbe29 | 2016-01-19 13:07:23 +0100 | [diff] [blame] | 282 | call Reset_arglist() |
| 283 | call assert_equal([], argv()) |
| 284 | call assert_equal("", argv(2)) |
| 285 | argadd a b c d |
| 286 | call assert_equal('c', argv(2)) |
Bram Moolenaar | 8c34aa0 | 2017-03-16 22:52:32 +0100 | [diff] [blame] | 287 | endfunc |
Bram Moolenaar | 99dbe29 | 2016-01-19 13:07:23 +0100 | [diff] [blame] | 288 | |
| 289 | " Test for the :argedit command |
Bram Moolenaar | 8c34aa0 | 2017-03-16 22:52:32 +0100 | [diff] [blame] | 290 | func Test_argedit() |
Bram Moolenaar | 99dbe29 | 2016-01-19 13:07:23 +0100 | [diff] [blame] | 291 | call Reset_arglist() |
| 292 | argedit a |
| 293 | call assert_equal(['a'], argv()) |
| 294 | call assert_equal('a', expand('%:t')) |
| 295 | argedit b |
| 296 | call assert_equal(['a', 'b'], argv()) |
| 297 | call assert_equal('b', expand('%:t')) |
| 298 | argedit a |
Bram Moolenaar | 90305c6 | 2017-07-16 15:31:17 +0200 | [diff] [blame] | 299 | call assert_equal(['a', 'b', 'a'], argv()) |
Bram Moolenaar | 99dbe29 | 2016-01-19 13:07:23 +0100 | [diff] [blame] | 300 | call assert_equal('a', expand('%:t')) |
Bram Moolenaar | 9b50bba | 2017-07-16 16:42:13 +0200 | [diff] [blame] | 301 | " When file name case is ignored, an existing buffer with only case |
Bram Moolenaar | cf1ba35 | 2017-10-27 00:55:04 +0200 | [diff] [blame] | 302 | " difference is re-used. |
Bram Moolenaar | 90305c6 | 2017-07-16 15:31:17 +0200 | [diff] [blame] | 303 | argedit C D |
| 304 | call assert_equal('C', expand('%:t')) |
| 305 | call assert_equal(['a', 'b', 'a', 'C', 'D'], argv()) |
Bram Moolenaar | 99dbe29 | 2016-01-19 13:07:23 +0100 | [diff] [blame] | 306 | argedit c |
Bram Moolenaar | 9b50bba | 2017-07-16 16:42:13 +0200 | [diff] [blame] | 307 | if has('fname_case') |
| 308 | call assert_equal(['a', 'b', 'a', 'C', 'c', 'D'], argv()) |
| 309 | else |
| 310 | call assert_equal(['a', 'b', 'a', 'C', 'C', 'D'], argv()) |
| 311 | endif |
Bram Moolenaar | 99dbe29 | 2016-01-19 13:07:23 +0100 | [diff] [blame] | 312 | 0argedit x |
Bram Moolenaar | 9b50bba | 2017-07-16 16:42:13 +0200 | [diff] [blame] | 313 | if has('fname_case') |
| 314 | call assert_equal(['x', 'a', 'b', 'a', 'C', 'c', 'D'], argv()) |
| 315 | else |
| 316 | call assert_equal(['x', 'a', 'b', 'a', 'C', 'C', 'D'], argv()) |
| 317 | endif |
Bram Moolenaar | 99dbe29 | 2016-01-19 13:07:23 +0100 | [diff] [blame] | 318 | enew! | set modified |
| 319 | call assert_fails('argedit y', 'E37:') |
| 320 | argedit! y |
Bram Moolenaar | 9b50bba | 2017-07-16 16:42:13 +0200 | [diff] [blame] | 321 | if has('fname_case') |
| 322 | call assert_equal(['x', 'y', 'y', 'a', 'b', 'a', 'C', 'c', 'D'], argv()) |
| 323 | else |
| 324 | call assert_equal(['x', 'y', 'y', 'a', 'b', 'a', 'C', 'C', 'D'], argv()) |
| 325 | endif |
Bram Moolenaar | 99dbe29 | 2016-01-19 13:07:23 +0100 | [diff] [blame] | 326 | %argd |
Bram Moolenaar | 9b50bba | 2017-07-16 16:42:13 +0200 | [diff] [blame] | 327 | bwipe! C |
| 328 | bwipe! D |
Bram Moolenaar | 46a53df | 2018-04-24 21:58:51 +0200 | [diff] [blame] | 329 | |
| 330 | " :argedit reuses the current buffer if it is empty |
| 331 | %argd |
| 332 | " make sure to use a new buffer number for x when it is loaded |
| 333 | bw! x |
| 334 | new |
| 335 | let a = bufnr('') |
| 336 | argedit x |
| 337 | call assert_equal(a, bufnr('')) |
| 338 | call assert_equal('x', bufname('')) |
| 339 | %argd |
| 340 | bw! x |
Bram Moolenaar | 8c34aa0 | 2017-03-16 22:52:32 +0100 | [diff] [blame] | 341 | endfunc |
Bram Moolenaar | 99dbe29 | 2016-01-19 13:07:23 +0100 | [diff] [blame] | 342 | |
| 343 | " Test for the :argdelete command |
Bram Moolenaar | 8c34aa0 | 2017-03-16 22:52:32 +0100 | [diff] [blame] | 344 | func Test_argdelete() |
Bram Moolenaar | 99dbe29 | 2016-01-19 13:07:23 +0100 | [diff] [blame] | 345 | call Reset_arglist() |
| 346 | args aa a aaa b bb |
| 347 | argdelete a* |
| 348 | call assert_equal(['b', 'bb'], argv()) |
| 349 | call assert_equal('aa', expand('%:t')) |
| 350 | last |
| 351 | argdelete % |
| 352 | call assert_equal(['b'], argv()) |
| 353 | call assert_fails('argdelete', 'E471:') |
| 354 | call assert_fails('1,100argdelete', 'E16:') |
| 355 | %argd |
Bram Moolenaar | 8c34aa0 | 2017-03-16 22:52:32 +0100 | [diff] [blame] | 356 | endfunc |
Bram Moolenaar | 99dbe29 | 2016-01-19 13:07:23 +0100 | [diff] [blame] | 357 | |
| 358 | " Tests for the :next, :prev, :first, :last, :rewind commands |
Bram Moolenaar | 8c34aa0 | 2017-03-16 22:52:32 +0100 | [diff] [blame] | 359 | func Test_argpos() |
Bram Moolenaar | 99dbe29 | 2016-01-19 13:07:23 +0100 | [diff] [blame] | 360 | call Reset_arglist() |
| 361 | args a b c d |
| 362 | last |
| 363 | call assert_equal(3, argidx()) |
| 364 | call assert_fails('next', 'E165:') |
| 365 | prev |
| 366 | call assert_equal(2, argidx()) |
| 367 | Next |
| 368 | call assert_equal(1, argidx()) |
| 369 | first |
| 370 | call assert_equal(0, argidx()) |
| 371 | call assert_fails('prev', 'E164:') |
| 372 | 3next |
| 373 | call assert_equal(3, argidx()) |
| 374 | rewind |
| 375 | call assert_equal(0, argidx()) |
| 376 | %argd |
Bram Moolenaar | 8c34aa0 | 2017-03-16 22:52:32 +0100 | [diff] [blame] | 377 | endfunc |
Bram Moolenaar | 53f1673 | 2016-09-07 20:46:39 +0200 | [diff] [blame] | 378 | |
| 379 | " Test for autocommand that redefines the argument list, when doing ":all". |
Bram Moolenaar | 8c34aa0 | 2017-03-16 22:52:32 +0100 | [diff] [blame] | 380 | func Test_arglist_autocmd() |
Bram Moolenaar | 53f1673 | 2016-09-07 20:46:39 +0200 | [diff] [blame] | 381 | autocmd BufReadPost Xxx2 next Xxx2 Xxx1 |
| 382 | call writefile(['test file Xxx1'], 'Xxx1') |
| 383 | call writefile(['test file Xxx2'], 'Xxx2') |
| 384 | call writefile(['test file Xxx3'], 'Xxx3') |
| 385 | |
| 386 | new |
| 387 | " redefine arglist; go to Xxx1 |
| 388 | next! Xxx1 Xxx2 Xxx3 |
| 389 | " open window for all args |
| 390 | all |
| 391 | call assert_equal('test file Xxx1', getline(1)) |
| 392 | wincmd w |
| 393 | wincmd w |
| 394 | call assert_equal('test file Xxx1', getline(1)) |
| 395 | " should now be in Xxx2 |
| 396 | rewind |
| 397 | call assert_equal('test file Xxx2', getline(1)) |
| 398 | |
| 399 | autocmd! BufReadPost Xxx2 |
| 400 | enew! | only |
| 401 | call delete('Xxx1') |
| 402 | call delete('Xxx2') |
| 403 | call delete('Xxx3') |
| 404 | argdelete Xxx* |
| 405 | bwipe! Xxx1 Xxx2 Xxx3 |
Bram Moolenaar | 8c34aa0 | 2017-03-16 22:52:32 +0100 | [diff] [blame] | 406 | endfunc |
| 407 | |
| 408 | func Test_arg_all_expand() |
| 409 | call writefile(['test file Xxx1'], 'Xx x') |
| 410 | next notexist Xx\ x runtest.vim |
| 411 | call assert_equal('notexist Xx\ x runtest.vim', expand('##')) |
| 412 | call delete('Xx x') |
| 413 | endfunc |
Bram Moolenaar | e961cba | 2018-09-18 21:51:47 +0200 | [diff] [blame^] | 414 | |
| 415 | func Test_large_arg() |
| 416 | " Argument longer or equal to the number of columns used to cause |
| 417 | " access to invalid memory. |
| 418 | exe 'argadd ' .repeat('x', &columns) |
| 419 | args |
| 420 | endfunc |