]> git.pld-linux.org Git - packages/vim.git/blob - 7.2.139
- new
[packages/vim.git] / 7.2.139
1 To: vim-dev@vim.org
2 Subject: Patch 7.2.139
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 Mime-Version: 1.0
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
8 ------------
9
10 Patch 7.2.139
11 Problem:    Crash when 'virtualedit' is "all". (James Vega)
12 Solution:   Avoid overflow when column is MAXCOL. (Dominique Pelle)
13 Files:      src/misc2.c
14
15
16 *** ../vim-7.2.138/src/misc2.c  Tue Feb 24 04:28:40 2009
17 --- src/misc2.c Wed Mar 11 16:45:05 2009
18 ***************
19 *** 496,502 ****
20   {
21       colnr_T len;
22   #ifdef FEAT_VIRTUALEDIT
23 !     colnr_T oldcol = curwin->w_cursor.col + curwin->w_cursor.coladd;
24   #endif
25   
26       len = (colnr_T)STRLEN(ml_get_curline());
27 --- 496,503 ----
28   {
29       colnr_T len;
30   #ifdef FEAT_VIRTUALEDIT
31 !     colnr_T oldcol = curwin->w_cursor.col;
32 !     colnr_T oldcoladd = curwin->w_cursor.col + curwin->w_cursor.coladd;
33   #endif
34   
35       len = (colnr_T)STRLEN(ml_get_curline());
36 ***************
37 *** 535,541 ****
38       if (oldcol == MAXCOL)
39         curwin->w_cursor.coladd = 0;
40       else if (ve_flags == VE_ALL)
41 !       curwin->w_cursor.coladd = oldcol - curwin->w_cursor.col;
42   #endif
43   }
44   
45 --- 536,548 ----
46       if (oldcol == MAXCOL)
47         curwin->w_cursor.coladd = 0;
48       else if (ve_flags == VE_ALL)
49 !     {
50 !       if (oldcoladd > curwin->w_cursor.col)
51 !           curwin->w_cursor.coladd = oldcoladd - curwin->w_cursor.col;
52 !       else
53 !           /* avoid weird number when there is a miscalculation or overflow */
54 !           curwin->w_cursor.coladd = 0;
55 !     }
56   #endif
57   }
58   
59 *** ../vim-7.2.138/src/version.c        Wed Mar 11 16:36:04 2009
60 --- src/version.c       Wed Mar 11 17:26:50 2009
61 ***************
62 *** 678,679 ****
63 --- 678,681 ----
64   {   /* Add new patch number below this line */
65 + /**/
66 +     139,
67   /**/
68
69 -- 
70 Some of the well know MS-Windows errors:
71         EHUH            Unexpected error
72         EUSER           User error, not our fault!
73         EGOD            Horrible problem, god knows what has happened
74         EERR            Errornous error: nothing wrong
75
76  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
77 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
78 \\\        download, build and distribute -- http://www.A-A-P.org        ///
79  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
This page took 0.026045 seconds and 3 git commands to generate.