To: [email protected]
Subject: Patch 6.3b.008
Fcc: outbox
From: Bram Moolenaar <[email protected]>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
------------

Patch 6.3b.008
Problem:    Using ":finally" in a user command doesn't always work. (Hari
           Krishna Dara)
Solution:   Don't assume that using getexline() means the command was typed.
Files:      src/ex_docmd.c


*** ../vim-6.3b.007/src/ex_docmd.c      Wed May 26 18:48:19 2004
--- src/ex_docmd.c      Fri May 28 14:58:15 2004
***************
*** 612,617 ****
--- 612,618 ----
 {
     char_u    *next_cmdline;          /* next cmd to execute */
     char_u    *cmdline_copy = NULL;   /* copy of cmd line */
+     int               used_getline = FALSE;   /* used "getline" to obtain command */
     static int        recursive = 0;          /* recursive depth */
     int               msg_didout_before_start = 0;
     int               count = 0;              /* line number count */
***************
*** 885,890 ****
--- 886,892 ----
               retval = FAIL;
               break;
           }
+           used_getline = TRUE;

           /*
            * Keep the first typed line.  Clear it when more lines are typed.
***************
*** 1151,1157 ****
               && cstack.cs_trylevel == 0
 #endif
           )
!           && !(did_emsg && (getline_equal(getline, cookie, getexmodeline)
                               || getline_equal(getline, cookie, getexline)))
           && (next_cmdline != NULL
 #ifdef FEAT_EVAL
--- 1153,1160 ----
               && cstack.cs_trylevel == 0
 #endif
           )
!           && !(did_emsg && used_getline
!                         && (getline_equal(getline, cookie, getexmodeline)
                               || getline_equal(getline, cookie, getexline)))
           && (next_cmdline != NULL
 #ifdef FEAT_EVAL
*** ../vim-6.3b.007/src/version.c       Wed May 26 18:48:19 2004
--- src/version.c       Fri May 28 21:39:44 2004
***************
*** 643,644 ****
--- 643,646 ----
 {   /* Add new patch number below this line */
+ /**/
+     8,
 /**/

--
I think that you'll agree that engineers are very effective in their social
interactions.  It's the "normal" people who are nuts.
                               (Scott Adams - The Dilbert principle)

/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
\\\  Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///