]> granicus.if.org Git - vim/commitdiff
updated for version 7.2-268 v7.2.268
authorBram Moolenaar <Bram@vim.org>
Tue, 3 Nov 2009 10:43:27 +0000 (10:43 +0000)
committerBram Moolenaar <Bram@vim.org>
Tue, 3 Nov 2009 10:43:27 +0000 (10:43 +0000)
src/if_python.c
src/version.c

index e483bfc8a8bc192b11da0c2b8ec559871e0e7182..b9a12fa2128138b50c1112ec8975344aa5361622 100644 (file)
@@ -2058,6 +2058,7 @@ WindowSetattr(PyObject *self, char *name, PyObject *val)
     {
        long lnum;
        long col;
+       long len;
 
        if (!PyArg_Parse(val, "(ll)", &lnum, &col))
            return -1;
@@ -2072,10 +2073,16 @@ WindowSetattr(PyObject *self, char *name, PyObject *val)
        if (VimErrorCheck())
            return -1;
 
-       /* NO CHECK ON COLUMN - SEEMS NOT TO MATTER */
+       /* When column is out of range silently correct it. */
+       len = STRLEN(ml_get_buf(this->win->w_buffer, lnum, FALSE));
+       if (col > len)
+           col = len;
 
        this->win->w_cursor.lnum = lnum;
        this->win->w_cursor.col = col;
+#ifdef FEAT_VIRTUALEDIT
+       this->win->w_cursor.coladd = 0;
+#endif
        update_screen(VALID);
 
        return 0;
index a1e052c4dd08719f7b3dde70f2fc10afe7cb523b..92305710823358091f407f8c8c195d8b890ee58d 100644 (file)
@@ -676,6 +676,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    268,
 /**/
     267,
 /**/