[prev in list] [next in list] [prev in thread] [next in thread] 

List:       vim-dev
Subject:    Re: Vim 6.1.146 crashing on undo after function call
From:       Bram Moolenaar <Bram () moolenaar ! net>
Date:       2002-08-22 20:54:08
[Download RAW message or body]


[redirected from vim to vim-dev]

David Fishburn wrote:

> VIM 6.1.146  W2K
> 
> I wrote my own function to format SQL statements.  It relies on having
> Align.vim version 13 installed.
> 
> If I format the statement, everything is great.  But if I attempt to
> undo the change, VIM crashes.  In a larger file, it didn't crash but it
> put the wrong text back.

I have narrowed down the location of the problem, but don't have a
proper fix yet.  This patch will work around the actual problem:

*** undo.c~	Tue Apr  9 22:22:46 2002
--- undo.c	Thu Aug 22 22:48:20 2002
***************
*** 255,261 ****
  	 * Check the ten last changes.  More doesn't make sense and takes too
  	 * long.
  	 */
! 	if (size == 1)
  	{
  	    uep = u_get_headentry();
  	    for (i = 0; i < 10; ++i)
--- 255,261 ----
  	 * Check the ten last changes.  More doesn't make sense and takes too
  	 * long.
  	 */
! 	if (size == 1 && 0)
  	{
  	    uep = u_get_headentry();
  	    for (i = 0; i < 10; ++i)

It's complicated, finding a proper fix will take a while.

-- 
ARTHUR: Right! Knights! Forward!
   ARTHUR leads a charge toward the castle.  Various shots of them battling on,
   despite being hit by a variety of farm animals.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
///   Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim   \\\
\\\           Project leader for A-A-P -- http://www.a-a-p.org           ///
 \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic