4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: Crash when using Python to set cursor beyond end of line.
13 Solution: Check the column to be valid.
14 Files: src/if_python.c
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
27 if (!PyArg_Parse(val, "(ll)", &lnum, &col))
34 ! /* NO CHECK ON COLUMN - SEEMS NOT TO MATTER */
36 this->win->w_cursor.lnum = lnum;
37 this->win->w_cursor.col = col;
45 ! /* When column is out of range silently correct it. */
46 ! len = STRLEN(ml_get_buf(this->win->w_buffer, lnum, FALSE));
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;
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
63 { /* Add new patch number below this line */
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.
73 VOICE OVER: The cartoon peril was no more ... The Quest for Holy Grail could
75 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
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 ///