To: [email protected]
Subject: Patch 5.6a.004
Fcc: outbox
From: Bram Moolenaar <[email protected]>
------------

Patch 5.6a.004
Problem:    A missing ":endwhile" or ":endif" doesn't give an error message.
           (Johannes Zellner)
Solution:   Check for missing ":endwhile" and ":endif" in sourced files.
           Add missing ":endif" in file selection macros.
Files:      src/ex_docmd.c, runtime/macros/file_select.vim


*** ../vim-5.6a.3/src/ex_docmd.c        Mon Dec 20 09:59:09 1999
--- src/ex_docmd.c      Tue Dec 21 12:41:01 1999
***************
*** 581,586 ****
--- 581,594 ----
 #ifdef WANT_EVAL
     free_cmdlines(&lines_ga);
     ga_clear(&lines_ga);
+
+     if (cstack.cs_idx >= 0 && getline == getsourceline)
+     {
+       if (cstack.cs_flags[cstack.cs_idx] & CSF_WHILE)
+           EMSG("Missing :endwhile");
+       else
+           EMSG("Missing :endif");
+     }
 #endif

     /*
*** ../vim-5.6a.3/runtime/macros/file_select.vim        Mon Dec 20 09:59:27 1999
--- runtime/macros/file_select.vim      Tue Dec 21 12:45:52 1999
***************
*** 3,9 ****
 "             File manager macros for Vim 5   (UNIX only)
 "
 "      Author:  Ra'ul Segura Acevedo <[email protected]>
! " Last modified:  971219  (1997 Dec 19)
 "    Suggestion:  Add the command "so filename" in your ~/.vimrc
 "               (where filename is the name of this file).
 "
--- 3,9 ----
 "             File manager macros for Vim 5   (UNIX only)
 "
 "      Author:  Ra'ul Segura Acevedo <[email protected]>
! " Last modified:  991221  (1999 Dec 21)
 "    Suggestion:  Add the command "so filename" in your ~/.vimrc
 "               (where filename is the name of this file).
 "
***************
*** 461,465 ****
--- 461,466 ----
       hi LsExe        start=<Esc>[35m stop=<Esc>[m ctermfg=magenta guifg=Magenta
     en
   let b:current_syntax = "ls"
+   en
 endif
 aug END
*** ../vim-5.6a.3/src/version.c Tue Dec 21 12:26:07 1999
--- src/version.c       Tue Dec 21 13:00:01 1999
***************
*** 420,421 ****
--- 420,423 ----
 {   /* Add new patch number below this line */
+ /**/
+     4,
 /**/

--
Females are strictly forbidden to appear unshaven in public.
               [real standing law in New Mexico, United States of America]

--/-/---- Bram Moolenaar ---- [email protected] ---- [email protected] ---\-\--
 \ \    www.vim.org/iccf      www.moolenaar.net       www.vim.org    / /