summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2009-11-03 10:43:27 +0000
committerBram Moolenaar <Bram@vim.org>2009-11-03 10:43:27 +0000
commitbadfde1bfe756d529389bee7084341e4adbdf495 (patch)
treefe218b78eddc66b8a60170fb254f8e9b49c004ff /src
parent8701cd6a226fa0b79de7f32fb700e7bf3eb05dbd (diff)
downloadvim-git-badfde1bfe756d529389bee7084341e4adbdf495.tar.gz
updated for version 7.2-268v7.2.268
Diffstat (limited to 'src')
-rw-r--r--src/if_python.c9
-rw-r--r--src/version.c2
2 files changed, 10 insertions, 1 deletions
diff --git a/src/if_python.c b/src/if_python.c
index e483bfc8a..b9a12fa21 100644
--- a/src/if_python.c
+++ b/src/if_python.c
@@ -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;
diff --git a/src/version.c b/src/version.c
index a1e052c4d..923057108 100644
--- a/src/version.c
+++ b/src/version.c
@@ -677,6 +677,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 268,
+/**/
267,
/**/
266,