1" Test commands that are not compiled in a :def function 2 3source check.vim 4source vim9.vim 5source term_util.vim 6source view_util.vim 7 8def Test_edit_wildcards() 9 var filename = 'Xtest' 10 edit `=filename` 11 assert_equal('Xtest', bufname()) 12 13 var filenr = 123 14 edit Xtest`=filenr` 15 assert_equal('Xtest123', bufname()) 16 17 filenr = 77 18 edit `=filename``=filenr` 19 assert_equal('Xtest77', bufname()) 20 21 edit X`=filename`xx`=filenr`yy 22 assert_equal('XXtestxx77yy', bufname()) 23 24 CheckDefFailure(['edit `=xxx`'], 'E1001:') 25 CheckDefFailure(['edit `="foo"'], 'E1083:') 26enddef 27 28def Test_expand_alternate_file() 29 var lines =<< trim END 30 edit Xfileone 31 var bone = bufnr() 32 edit Xfiletwo 33 var btwo = bufnr() 34 edit Xfilethree 35 var bthree = bufnr() 36 37 edit # 38 assert_equal(bthree, bufnr()) 39 edit %% 40 assert_equal(btwo, bufnr()) 41 edit %% # comment 42 assert_equal(bthree, bufnr()) 43 edit %%yy 44 assert_equal('Xfiletwoyy', bufname()) 45 46 exe "edit %%" .. bone 47 assert_equal(bone, bufnr()) 48 exe "edit %%" .. btwo .. "xx" 49 assert_equal('Xfiletwoxx', bufname()) 50 51 next Xfileone Xfiletwo Xfilethree 52 assert_equal('Xfileone', argv(0)) 53 assert_equal('Xfiletwo', argv(1)) 54 assert_equal('Xfilethree', argv(2)) 55 next %%%zz 56 assert_equal('Xfileone', argv(0)) 57 assert_equal('Xfiletwo', argv(1)) 58 assert_equal('Xfilethreezz', argv(2)) 59 60 v:oldfiles = ['Xonefile', 'Xtwofile'] 61 edit %%<1 62 assert_equal('Xonefile', bufname()) 63 edit %%<2 64 assert_equal('Xtwofile', bufname()) 65 assert_fails('edit %%<3', 'E684:') 66 67 edit Xfileone.vim 68 edit Xfiletwo 69 edit %%:r 70 assert_equal('Xfileone', bufname()) 71 END 72 CheckDefAndScriptSuccess(lines) 73enddef 74 75def Test_global_backtick_expansion() 76 new 77 setline(1, 'xx') 78 var name = 'foobar' 79 g/^xx/s/.*/`=name` 80 assert_equal('foobar', getline(1)) 81 bwipe! 82enddef 83 84def Test_folddo_backtick_expansion() 85 new 86 var name = 'xxx' 87 folddoopen edit `=name` 88 assert_equal('xxx', bufname()) 89 bwipe! 90 91 new 92 setline(1, ['one', 'two']) 93 set nomodified 94 :1,2fold 95 foldclose 96 folddoclose edit `=name` 97 assert_equal('xxx', bufname()) 98 bwipe! 99enddef 100 101def Test_hardcopy_wildcards() 102 CheckUnix 103 CheckFeature postscript 104 105 var outfile = 'print' 106 hardcopy > X`=outfile`.ps 107 assert_true(filereadable('Xprint.ps')) 108 109 delete('Xprint.ps') 110enddef 111 112def Test_syn_include_wildcards() 113 writefile(['syn keyword Found found'], 'Xthemine.vim') 114 var save_rtp = &rtp 115 &rtp = '.' 116 117 var fname = 'mine' 118 syn include @Group Xthe`=fname`.vim 119 assert_match('Found.* contained found', execute('syn list Found')) 120 121 &rtp = save_rtp 122 delete('Xthemine.vim') 123enddef 124 125def Test_echo_linebreak() 126 var lines =<< trim END 127 vim9script 128 redir @a 129 echo 'one' 130 .. 'two' 131 redir END 132 assert_equal("\nonetwo", @a) 133 END 134 CheckScriptSuccess(lines) 135 136 lines =<< trim END 137 vim9script 138 redir @a 139 echo 11 + 140 77 141 - 22 142 redir END 143 assert_equal("\n66", @a) 144 END 145 CheckScriptSuccess(lines) 146enddef 147 148def Test_condition_types() 149 var lines =<< trim END 150 if 'text' 151 endif 152 END 153 CheckDefAndScriptFailure(lines, 'E1135:', 1) 154 155 lines =<< trim END 156 if [1] 157 endif 158 END 159 CheckDefFailure(lines, 'E1012:', 1) 160 CheckScriptFailure(['vim9script'] + lines, 'E745:', 2) 161 162 lines =<< trim END 163 g:cond = 'text' 164 if g:cond 165 endif 166 END 167 CheckDefExecAndScriptFailure(lines, 'E1135:', 2) 168 169 lines =<< trim END 170 g:cond = 0 171 if g:cond 172 elseif 'text' 173 endif 174 END 175 CheckDefFailure(lines, 'E1012:', 3) 176 CheckScriptFailure(['vim9script'] + lines, 'E1135:', 4) 177 178 lines =<< trim END 179 if g:cond 180 elseif [1] 181 endif 182 END 183 CheckDefFailure(lines, 'E1012:', 2) 184 CheckScriptFailure(['vim9script'] + lines, 'E745:', 3) 185 186 lines =<< trim END 187 g:cond = 'text' 188 if 0 189 elseif g:cond 190 endif 191 END 192 CheckDefExecAndScriptFailure(lines, 'E1135:', 3) 193 194 lines =<< trim END 195 while 'text' 196 endwhile 197 END 198 CheckDefFailure(lines, 'E1012:', 1) 199 CheckScriptFailure(['vim9script'] + lines, 'E1135:', 2) 200 201 lines =<< trim END 202 while [1] 203 endwhile 204 END 205 CheckDefFailure(lines, 'E1012:', 1) 206 CheckScriptFailure(['vim9script'] + lines, 'E745:', 2) 207 208 lines =<< trim END 209 g:cond = 'text' 210 while g:cond 211 endwhile 212 END 213 CheckDefExecAndScriptFailure(lines, 'E1135:', 2) 214enddef 215 216def Test_if_linebreak() 217 var lines =<< trim END 218 vim9script 219 if 1 && 220 true 221 || 1 222 g:res = 42 223 endif 224 assert_equal(42, g:res) 225 END 226 CheckScriptSuccess(lines) 227 unlet g:res 228 229 lines =<< trim END 230 vim9script 231 if 1 && 232 0 233 g:res = 0 234 elseif 0 || 235 0 236 || 1 237 g:res = 12 238 endif 239 assert_equal(12, g:res) 240 END 241 CheckScriptSuccess(lines) 242 unlet g:res 243enddef 244 245def Test_while_linebreak() 246 var lines =<< trim END 247 vim9script 248 var nr = 0 249 while nr < 250 10 + 3 251 nr = nr 252 + 4 253 endwhile 254 assert_equal(16, nr) 255 END 256 CheckScriptSuccess(lines) 257 258 lines =<< trim END 259 vim9script 260 var nr = 0 261 while nr 262 < 263 10 264 + 265 3 266 nr = nr 267 + 268 4 269 endwhile 270 assert_equal(16, nr) 271 END 272 CheckScriptSuccess(lines) 273enddef 274 275def Test_for_linebreak() 276 var lines =<< trim END 277 vim9script 278 var nr = 0 279 for x 280 in 281 [1, 2, 3, 4] 282 nr = nr + x 283 endfor 284 assert_equal(10, nr) 285 END 286 CheckScriptSuccess(lines) 287 288 lines =<< trim END 289 vim9script 290 var nr = 0 291 for x 292 in 293 [1, 2, 294 3, 4 295 ] 296 nr = nr 297 + 298 x 299 endfor 300 assert_equal(10, nr) 301 END 302 CheckScriptSuccess(lines) 303enddef 304 305def Test_method_call_linebreak() 306 var lines =<< trim END 307 vim9script 308 var res = [] 309 func RetArg( 310 arg 311 ) 312 let s:res = a:arg 313 endfunc 314 [1, 315 2, 316 3]->RetArg() 317 assert_equal([1, 2, 3], res) 318 END 319 CheckScriptSuccess(lines) 320enddef 321 322def Test_skipped_expr_linebreak() 323 if 0 324 var x = [] 325 ->map(() => 0) 326 endif 327enddef 328 329def Test_dict_member() 330 var test: dict<list<number>> = {data: [3, 1, 2]} 331 test.data->sort() 332 assert_equal({data: [1, 2, 3]}, test) 333 test.data 334 ->reverse() 335 assert_equal({data: [3, 2, 1]}, test) 336 337 var lines =<< trim END 338 vim9script 339 var test: dict<list<number>> = {data: [3, 1, 2]} 340 test.data->sort() 341 assert_equal({data: [1, 2, 3]}, test) 342 END 343 CheckScriptSuccess(lines) 344enddef 345 346def Test_bar_after_command() 347 def RedrawAndEcho() 348 var x = 'did redraw' 349 redraw | echo x 350 enddef 351 RedrawAndEcho() 352 assert_match('did redraw', Screenline(&lines)) 353 354 def CallAndEcho() 355 var x = 'did redraw' 356 reg_executing() | echo x 357 enddef 358 CallAndEcho() 359 assert_match('did redraw', Screenline(&lines)) 360 361 if has('unix') 362 # bar in filter write command does not start new command 363 def WriteToShell() 364 new 365 setline(1, 'some text') 366 w !cat | cat > Xoutfile 367 bwipe! 368 enddef 369 WriteToShell() 370 assert_equal(['some text'], readfile('Xoutfile')) 371 delete('Xoutfile') 372 373 # bar in filter read command does not start new command 374 def ReadFromShell() 375 new 376 r! echo hello there | cat > Xoutfile 377 r !echo again | cat >> Xoutfile 378 bwipe! 379 enddef 380 ReadFromShell() 381 assert_equal(['hello there', 'again'], readfile('Xoutfile')) 382 delete('Xoutfile') 383 endif 384enddef 385 386def Test_filter_is_not_modifier() 387 var tags = [{a: 1, b: 2}, {x: 3, y: 4}] 388 filter(tags, ( _, v) => has_key(v, 'x') ? 1 : 0 ) 389 assert_equal([{x: 3, y: 4}], tags) 390enddef 391 392def Test_command_modifier_filter() 393 var lines =<< trim END 394 final expected = "\nType Name Content\n c \"c piyo" 395 @a = 'hoge' 396 @b = 'fuga' 397 @c = 'piyo' 398 399 assert_equal(execute('filter /piyo/ registers abc'), expected) 400 END 401 CheckDefAndScriptSuccess(lines) 402enddef 403 404def Test_win_command_modifiers() 405 assert_equal(1, winnr('$')) 406 407 set splitright 408 vsplit 409 assert_equal(2, winnr()) 410 close 411 aboveleft vsplit 412 assert_equal(1, winnr()) 413 close 414 set splitright& 415 416 vsplit 417 assert_equal(1, winnr()) 418 close 419 belowright vsplit 420 assert_equal(2, winnr()) 421 close 422 rightbelow vsplit 423 assert_equal(2, winnr()) 424 close 425 426 if has('browse') 427 browse set 428 assert_equal('option-window', expand('%')) 429 close 430 endif 431 432 vsplit 433 botright split 434 assert_equal(3, winnr()) 435 assert_equal(&columns, winwidth(0)) 436 close 437 close 438 439 vsplit 440 topleft split 441 assert_equal(1, winnr()) 442 assert_equal(&columns, winwidth(0)) 443 close 444 close 445 446 gettabinfo()->len()->assert_equal(1) 447 tab split 448 gettabinfo()->len()->assert_equal(2) 449 tabclose 450 451 vertical new 452 assert_inrange(&columns / 2 - 2, &columns / 2 + 1, winwidth(0)) 453 close 454enddef 455 456func Test_command_modifier_confirm() 457 CheckNotGui 458 CheckRunVimInTerminal 459 460 " Test for saving all the modified buffers 461 let lines =<< trim END 462 call setline(1, 'changed') 463 def Getout() 464 confirm write Xfile 465 enddef 466 END 467 call writefile(lines, 'Xconfirmscript') 468 call writefile(['empty'], 'Xfile') 469 let buf = RunVimInTerminal('-S Xconfirmscript', {'rows': 8}) 470 call term_sendkeys(buf, ":call Getout()\n") 471 call WaitForAssert({-> assert_match('(Y)es, \[N\]o: ', term_getline(buf, 8))}, 1000) 472 call term_sendkeys(buf, "y") 473 call WaitForAssert({-> assert_match('(Y)es, \[N\]o: ', term_getline(buf, 8))}, 1000) 474 call term_sendkeys(buf, "\<CR>") 475 call TermWait(buf) 476 call StopVimInTerminal(buf) 477 478 call assert_equal(['changed'], readfile('Xfile')) 479 call delete('Xfile') 480 call delete('.Xfile.swp') " in case Vim was killed 481 call delete('Xconfirmscript') 482endfunc 483 484def Test_command_modifiers_keep() 485 if has('unix') 486 def DoTest(addRflag: bool, keepMarks: bool, hasMarks: bool) 487 new 488 setline(1, ['one', 'two', 'three']) 489 normal 1Gma 490 normal 2Gmb 491 normal 3Gmc 492 if addRflag 493 set cpo+=R 494 else 495 set cpo-=R 496 endif 497 if keepMarks 498 keepmarks :%!cat 499 else 500 :%!cat 501 endif 502 if hasMarks 503 assert_equal(1, line("'a")) 504 assert_equal(2, line("'b")) 505 assert_equal(3, line("'c")) 506 else 507 assert_equal(0, line("'a")) 508 assert_equal(0, line("'b")) 509 assert_equal(0, line("'c")) 510 endif 511 quit! 512 enddef 513 DoTest(false, false, true) 514 DoTest(true, false, false) 515 DoTest(false, true, true) 516 DoTest(true, true, true) 517 set cpo&vim 518 519 new 520 setline(1, ['one', 'two', 'three', 'four']) 521 assert_equal(4, line("$")) 522 normal 1Gma 523 normal 2Gmb 524 normal 3Gmc 525 lockmarks :1,2!wc 526 # line is deleted, marks don't move 527 assert_equal(3, line("$")) 528 assert_equal('four', getline(3)) 529 assert_equal(1, line("'a")) 530 assert_equal(2, line("'b")) 531 assert_equal(3, line("'c")) 532 quit! 533 endif 534 535 edit Xone 536 edit Xtwo 537 assert_equal('Xone', expand('#')) 538 keepalt edit Xthree 539 assert_equal('Xone', expand('#')) 540 541 normal /a*b* 542 assert_equal('a*b*', histget("search")) 543 keeppatterns normal /c*d* 544 assert_equal('a*b*', histget("search")) 545 546 new 547 setline(1, range(10)) 548 :10 549 normal gg 550 assert_equal(10, getpos("''")[1]) 551 keepjumps normal 5G 552 assert_equal(10, getpos("''")[1]) 553 quit! 554enddef 555 556def Test_bar_line_continuation() 557 var lines =<< trim END 558 au BufNewFile Xfile g:readFile = 1 559 | g:readExtra = 2 560 g:readFile = 0 561 g:readExtra = 0 562 edit Xfile 563 assert_equal(1, g:readFile) 564 assert_equal(2, g:readExtra) 565 bwipe! 566 au! BufNewFile 567 568 au BufNewFile Xfile g:readFile = 1 569 | g:readExtra = 2 570 | g:readMore = 3 571 g:readFile = 0 572 g:readExtra = 0 573 g:readMore = 0 574 edit Xfile 575 assert_equal(1, g:readFile) 576 assert_equal(2, g:readExtra) 577 assert_equal(3, g:readMore) 578 bwipe! 579 au! BufNewFile 580 unlet g:readFile 581 unlet g:readExtra 582 unlet g:readMore 583 END 584 CheckDefAndScriptSuccess(lines) 585enddef 586 587def Test_command_modifier_other() 588 new Xsomefile 589 setline(1, 'changed') 590 var buf = bufnr() 591 hide edit Xotherfile 592 var info = getbufinfo(buf) 593 assert_equal(1, info[0].hidden) 594 assert_equal(1, info[0].changed) 595 edit Xsomefile 596 bwipe! 597 598 au BufNewFile Xfile g:readFile = 1 599 g:readFile = 0 600 edit Xfile 601 assert_equal(1, g:readFile) 602 bwipe! 603 g:readFile = 0 604 noautocmd edit Xfile 605 assert_equal(0, g:readFile) 606 au! BufNewFile 607 unlet g:readFile 608 609 noswapfile edit XnoSwap 610 assert_equal(false, &l:swapfile) 611 bwipe! 612 613 var caught = false 614 try 615 sandbox !ls 616 catch /E48:/ 617 caught = true 618 endtry 619 assert_true(caught) 620 621 :8verbose g:verbose_now = &verbose 622 assert_equal(8, g:verbose_now) 623 unlet g:verbose_now 624enddef 625 626def EchoHere() 627 echomsg 'here' 628enddef 629def EchoThere() 630 unsilent echomsg 'there' 631enddef 632 633def Test_modifier_silent_unsilent() 634 echomsg 'last one' 635 silent echomsg "text" 636 assert_equal("\nlast one", execute(':1messages')) 637 638 silent! echoerr "error" 639 640 echomsg 'last one' 641 silent EchoHere() 642 assert_equal("\nlast one", execute(':1messages')) 643 644 silent EchoThere() 645 assert_equal("\nthere", execute(':1messages')) 646 647 try 648 silent eval [][0] 649 catch 650 echomsg "caught" 651 endtry 652 assert_equal("\ncaught", execute(':1messages')) 653enddef 654 655def Test_range_after_command_modifier() 656 CheckScriptFailure(['vim9script', 'silent keepjump 1d _'], 'E1050: Colon required before a range: 1d _', 2) 657 new 658 setline(1, 'xxx') 659 CheckScriptSuccess(['vim9script', 'silent keepjump :1d _']) 660 assert_equal('', getline(1)) 661 bwipe! 662enddef 663 664def Test_silent_pattern() 665 new 666 silent! :/pat/put _ 667 bwipe! 668enddef 669 670def Test_eval_command() 671 var from = 3 672 var to = 5 673 g:val = 111 674 def Increment(nrs: list<number>) 675 for nr in nrs 676 g:val += nr 677 endfor 678 enddef 679 eval range(from, to) 680 ->Increment() 681 assert_equal(111 + 3 + 4 + 5, g:val) 682 unlet g:val 683 684 var lines =<< trim END 685 vim9script 686 g:caught = 'no' 687 try 688 eval 123 || 0 689 catch 690 g:caught = 'yes' 691 endtry 692 assert_equal('yes', g:caught) 693 unlet g:caught 694 END 695 CheckScriptSuccess(lines) 696enddef 697 698def Test_map_command() 699 var lines =<< trim END 700 nnoremap <F3> :echo 'hit F3 #'<CR> 701 assert_equal(":echo 'hit F3 #'<CR>", maparg("<F3>", "n")) 702 END 703 CheckDefSuccess(lines) 704 CheckScriptSuccess(['vim9script'] + lines) 705enddef 706 707def Test_normal_command() 708 new 709 setline(1, 'doesnotexist') 710 var caught = 0 711 try 712 exe "norm! \<C-]>" 713 catch /E433/ 714 caught = 2 715 endtry 716 assert_equal(2, caught) 717 718 try 719 exe "norm! 3\<C-]>" 720 catch /E433/ 721 caught = 3 722 endtry 723 assert_equal(3, caught) 724 bwipe! 725enddef 726 727def Test_put_command() 728 new 729 @p = 'ppp' 730 put p 731 assert_equal('ppp', getline(2)) 732 733 put ='below' 734 assert_equal('below', getline(3)) 735 put! ='above' 736 assert_equal('above', getline(3)) 737 assert_equal('below', getline(4)) 738 739 :2put =['a', 'b', 'c'] 740 assert_equal(['ppp', 'a', 'b', 'c', 'above'], getline(2, 6)) 741 742 # compute range at runtime 743 setline(1, range(1, 8)) 744 @a = 'aaa' 745 :$-2put a 746 assert_equal('aaa', getline(7)) 747 748 setline(1, range(1, 8)) 749 :2 750 :+2put! a 751 assert_equal('aaa', getline(4)) 752 753 bwipe! 754 755 CheckDefFailure(['put =xxx'], 'E1001:') 756enddef 757 758def Test_put_with_linebreak() 759 new 760 var lines =<< trim END 761 vim9script 762 pu =split('abc', '\zs') 763 ->join() 764 END 765 CheckScriptSuccess(lines) 766 getline(2)->assert_equal('a b c') 767 bwipe! 768enddef 769 770def Test_command_star_range() 771 new 772 setline(1, ['xxx foo xxx', 'xxx bar xxx', 'xxx foo xx bar']) 773 setpos("'<", [0, 1, 0, 0]) 774 setpos("'>", [0, 3, 0, 0]) 775 :*s/\(foo\|bar\)/baz/g 776 getline(1, 3)->assert_equal(['xxx baz xxx', 'xxx baz xxx', 'xxx baz xx baz']) 777 778 bwipe! 779enddef 780 781def Test_f_args() 782 var lines =<< trim END 783 vim9script 784 785 func SaveCmdArgs(...) 786 let g:args = a:000 787 endfunc 788 789 command -nargs=* TestFArgs call SaveCmdArgs(<f-args>) 790 791 TestFArgs 792 assert_equal([], g:args) 793 794 TestFArgs one two three 795 assert_equal(['one', 'two', 'three'], g:args) 796 END 797 CheckScriptSuccess(lines) 798enddef 799 800def Test_user_command_comment() 801 command -nargs=1 Comd echom <q-args> 802 803 var lines =<< trim END 804 vim9script 805 Comd # comment 806 END 807 CheckScriptSuccess(lines) 808 809 lines =<< trim END 810 vim9script 811 Comd# comment 812 END 813 CheckScriptFailure(lines, 'E1144:') 814 815 delcommand Comd 816enddef 817 818def Test_star_command() 819 var lines =<< trim END 820 vim9script 821 @s = 'g:success = 8' 822 set cpo+=* 823 exe '*s' 824 assert_equal(8, g:success) 825 unlet g:success 826 set cpo-=* 827 assert_fails("exe '*s'", 'E1050:') 828 END 829 CheckScriptSuccess(lines) 830enddef 831 832def Test_cmd_argument_without_colon() 833 new Xfile 834 setline(1, ['a', 'b', 'c', 'd']) 835 write 836 edit +3 % 837 assert_equal(3, getcurpos()[1]) 838 edit +/a % 839 assert_equal(1, getcurpos()[1]) 840 bwipe 841 delete('Xfile') 842enddef 843 844def Test_ambiguous_user_cmd() 845 command Cmd1 eval 0 846 command Cmd2 eval 0 847 var lines =<< trim END 848 Cmd 849 END 850 CheckDefAndScriptFailure(lines, 'E464:', 1) 851 delcommand Cmd1 852 delcommand Cmd2 853enddef 854 855def Test_command_not_recognized() 856 var lines =<< trim END 857 d.key = 'asdf' 858 END 859 CheckDefFailure(lines, 'E1146:', 1) 860 861 lines =<< trim END 862 d['key'] = 'asdf' 863 END 864 CheckDefFailure(lines, 'E1146:', 1) 865enddef 866 867def Test_magic_not_used() 868 new 869 for cmd in ['set magic', 'set nomagic'] 870 exe cmd 871 setline(1, 'aaa') 872 s/.../bbb/ 873 assert_equal('bbb', getline(1)) 874 endfor 875 876 set magic 877 setline(1, 'aaa') 878 assert_fails('s/.\M../bbb/', 'E486:') 879 assert_fails('snomagic/.../bbb/', 'E486:') 880 assert_equal('aaa', getline(1)) 881 882 bwipe! 883enddef 884 885def Test_gdefault_not_used() 886 new 887 for cmd in ['set gdefault', 'set nogdefault'] 888 exe cmd 889 setline(1, 'aaa') 890 s/./b/ 891 assert_equal('baa', getline(1)) 892 endfor 893 894 set nogdefault 895 bwipe! 896enddef 897 898def g:SomeComplFunc(findstart: number, base: string): any 899 if findstart 900 return 0 901 else 902 return ['aaa', 'bbb'] 903 endif 904enddef 905 906def Test_insert_complete() 907 # this was running into an error with the matchparen hack 908 new 909 set completefunc=SomeComplFunc 910 feedkeys("i\<c-x>\<c-u>\<Esc>", 'ntx') 911 assert_equal('aaa', getline(1)) 912 913 set completefunc= 914 bwipe! 915enddef 916 917def Test_wincmd() 918 split 919 var id1 = win_getid() 920 if true 921 try | wincmd w | catch | endtry 922 endif 923 assert_notequal(id1, win_getid()) 924 close 925enddef 926 927def Test_windo_missing_endif() 928 var lines =<< trim END 929 windo if 1 930 END 931 CheckDefExecFailure(lines, 'E171:', 1) 932enddef 933 934" vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker 935