components/vim/vim72-patches/7.2.324
changeset 198 172fc01ce997
equal deleted inserted replaced
197:fd801ec0737c 198:172fc01ce997
       
     1 To: [email protected]
       
     2 Subject: Patch 7.2.324
       
     3 Fcc: outbox
       
     4 From: Bram Moolenaar <[email protected]>
       
     5 Mime-Version: 1.0
       
     6 Content-Type: text/plain; charset=UTF-8
       
     7 Content-Transfer-Encoding: 8bit
       
     8 ------------
       
     9 
       
    10 Patch 7.2.324
       
    11 Problem:    A negative column argument in setpos() may cause a crash.
       
    12 Solution:   Check for invalid column number. (James Vega)
       
    13 Files:	    src/eval.c, src/misc2.c
       
    14 
       
    15 
       
    16 *** ../vim-7.2.323/src/eval.c	2009-12-24 15:00:31.000000000 +0100
       
    17 --- src/eval.c	2009-12-31 13:09:19.000000000 +0100
       
    18 ***************
       
    19 *** 15542,15548 ****
       
    20       {
       
    21   	if (list2fpos(&argvars[1], &pos, &fnum) == OK)
       
    22   	{
       
    23 ! 	    --pos.col;
       
    24   	    if (name[0] == '.' && name[1] == NUL)
       
    25   	    {
       
    26   		/* set cursor */
       
    27 --- 15542,15549 ----
       
    28       {
       
    29   	if (list2fpos(&argvars[1], &pos, &fnum) == OK)
       
    30   	{
       
    31 ! 	    if (--pos.col < 0)
       
    32 ! 		pos.col = 0;
       
    33   	    if (name[0] == '.' && name[1] == NUL)
       
    34   	    {
       
    35   		/* set cursor */
       
    36 *** ../vim-7.2.323/src/misc2.c	2009-11-25 17:15:16.000000000 +0100
       
    37 --- src/misc2.c	2009-12-31 13:12:36.000000000 +0100
       
    38 ***************
       
    39 *** 528,533 ****
       
    40 --- 528,535 ----
       
    41   #endif
       
    42   	}
       
    43       }
       
    44 +     else if (curwin->w_cursor.col < 0)
       
    45 + 	curwin->w_cursor.col = 0;
       
    46   
       
    47   #ifdef FEAT_VIRTUALEDIT
       
    48       /* If virtual editing is on, we can leave the cursor on the old position,
       
    49 *** ../vim-7.2.323/src/version.c	2009-12-24 16:11:24.000000000 +0100
       
    50 --- src/version.c	2009-12-31 13:17:25.000000000 +0100
       
    51 ***************
       
    52 *** 683,684 ****
       
    53 --- 683,686 ----
       
    54   {   /* Add new patch number below this line */
       
    55 + /**/
       
    56 +     324,
       
    57   /**/
       
    58 
       
    59 -- 
       
    60 "Thou shalt not follow the Null Pointer, for at its end Chaos and
       
    61 Madness lie."
       
    62 
       
    63  /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
       
    64 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
       
    65 \\\        download, build and distribute -- http://www.A-A-P.org        ///
       
    66  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///