To: [email protected]
Subject: Patch 6.3a.028
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.3a.028
Problem:    ":normal ." doesn't work inside a function, because redo is saved
           and restored. (Benji Fisher)
Solution:   Make a copy of the redo buffer when executing a function.
Files:      src/getchar.c


*** ../vim-6.3a.027/src/getchar.c       Fri May  7 10:59:37 2004
--- src/getchar.c       Sun May 16 13:25:18 2004
***************
*** 477,488 ****
--- 477,498 ----
     void
 saveRedobuff()
 {
+     char_u    *s;
+
     if (save_level++ == 0)
     {
       save_redobuff = redobuff;
       redobuff.bh_first.b_next = NULL;
       save_old_redobuff = old_redobuff;
       old_redobuff.bh_first.b_next = NULL;
+
+       /* Make a copy, so that ":normal ." in a function works. */
+       s = get_buffcont(&save_redobuff, FALSE);
+       if (s != NULL)
+       {
+           add_buff(&redobuff, s, -1L);
+           vim_free(s);
+       }
     }
 }

*** ../vim-6.3a.027/src/version.c       Sat May 15 22:08:19 2004
--- src/version.c       Sun May 16 13:27:16 2004
***************
*** 643,644 ****
--- 643,646 ----
 {   /* Add new patch number below this line */
+ /**/
+     28,
 /**/

--
We do not stumble over mountains, but over molehills.
                               Confucius

/// 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 ///