On Do, 17 Dez 2015, Mike Williams wrote:

> On 17/12/2015 12:30, Bram Moolenaar wrote:
> >It would be good to first be able to reproduce the problem, otherwise
> >we don't know if this change will actually fix the it.
> >
> >
> >--- ../../b/src/ex_cmds.c     2015-11-10 21:05:45.309028557 +0100
> >+++ ex_cmds.c   2015-12-17 13:00:53.896995875 +0100
> >@@ -540,10 +540,11 @@
> >         if (!unique || i == 0
> >                 || (sort_ic ? STRICMP(s, sortbuf1) : STRCMP(s, sortbuf1)) 
> > != 0)
> >         {
> >-           if (ml_append(lnum++, s, (colnr_T)0, FALSE) == FAIL)
> >+           /* Copy the line into a buffer, it may become invalid in
> >+            * ml_append(). And it's needed for "unique". */
> >+           STRCPY(sortbuf1, s);
> >+           if (ml_append(lnum++, sortbuf1, (colnr_T)0, FALSE) == FAIL)
> >                 break;
> >-           if (unique)
> >-               STRCPY(sortbuf1, s);
> >         }
> >         fast_breakcheck();
> >         if (got_int)
> 
> Tried this on Linux where I have been able to reproduce the corrupt,
> and it fixed it for me.  I checked it twice in case of finger
> trouble.  Will try on Windows later.

Can confirm.

Best,
Christian
-- 
Beleidigungen sind die Argumente derer, die unrecht haben.
                -- Jean Jacques Rousseau

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui