]> git.pld-linux.org Git - packages/vim.git/blob - 7.2.268
- new
[packages/vim.git] / 7.2.268
1 To: vim-dev@vim.org
2 Subject: Patch 7.2.268
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 Mime-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8 ------------
9
10 Patch 7.2.268
11 Problem:    Crash when using Python to set cursor beyond end of line.
12             (winterTTr)
13 Solution:   Check the column to be valid.
14 Files:      src/if_python.c
15
16
17 *** ../vim-7.2.267/src/if_python.c      2009-07-09 20:06:30.000000000 +0200
18 --- src/if_python.c     2009-10-10 14:49:10.000000000 +0200
19 ***************
20 *** 2058,2063 ****
21 --- 2058,2064 ----
22       {
23         long lnum;
24         long col;
25 +       long len;
26   
27         if (!PyArg_Parse(val, "(ll)", &lnum, &col))
28             return -1;
29 ***************
30 *** 2072,2081 ****
31         if (VimErrorCheck())
32             return -1;
33   
34 !       /* NO CHECK ON COLUMN - SEEMS NOT TO MATTER */
35   
36         this->win->w_cursor.lnum = lnum;
37         this->win->w_cursor.col = col;
38         update_screen(VALID);
39   
40         return 0;
41 --- 2073,2088 ----
42         if (VimErrorCheck())
43             return -1;
44   
45 !       /* When column is out of range silently correct it. */
46 !       len = STRLEN(ml_get_buf(this->win->w_buffer, lnum, FALSE));
47 !       if (col > len)
48 !           col = len;
49   
50         this->win->w_cursor.lnum = lnum;
51         this->win->w_cursor.col = col;
52 + #ifdef FEAT_VIRTUALEDIT
53 +       this->win->w_cursor.coladd = 0;
54 + #endif
55         update_screen(VALID);
56   
57         return 0;
58 *** ../vim-7.2.267/src/version.c        2009-10-07 16:19:52.000000000 +0200
59 --- src/version.c       2009-11-03 11:42:08.000000000 +0100
60 ***************
61 *** 678,679 ****
62 --- 678,681 ----
63   {   /* Add new patch number below this line */
64 + /**/
65 +     268,
66   /**/
67
68 -- 
69 VOICE OVER: As the horrendous Black Beast lunged forward, escape for Arthur
70             and his knights seemed hopeless,  when, suddenly ... the animator
71             suffered a fatal heart attack.
72 ANIMATOR:   Aaaaagh!
73 VOICE OVER: The cartoon peril was no more ... The Quest for Holy Grail could
74             continue.
75                  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
76
77  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
78 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
79 \\\        download, build and distribute -- http://www.A-A-P.org        ///
80  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
This page took 0.030176 seconds and 3 git commands to generate.