summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/eval.c3
-rw-r--r--src/misc2.c2
-rw-r--r--src/version.c2
3 files changed, 6 insertions, 1 deletions
diff --git a/src/eval.c b/src/eval.c
index 0ce6ff14cd..6bd2aa72e5 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -15542,7 +15542,8 @@ f_setpos(argvars, rettv)
{
if (list2fpos(&argvars[1], &pos, &fnum) == OK)
{
- --pos.col;
+ if (--pos.col < 0)
+ pos.col = 0;
if (name[0] == '.' && name[1] == NUL)
{
/* set cursor */
diff --git a/src/misc2.c b/src/misc2.c
index e157aae9e5..949d7e21a8 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -528,6 +528,8 @@ check_cursor_col()
#endif
}
}
+ else if (curwin->w_cursor.col < 0)
+ curwin->w_cursor.col = 0;
#ifdef FEAT_VIRTUALEDIT
/* If virtual editing is on, we can leave the cursor on the old position,
diff --git a/src/version.c b/src/version.c
index 36ff3b6f5d..ed0058d352 100644
--- a/src/version.c
+++ b/src/version.c
@@ -682,6 +682,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 324,
+/**/
323,
/**/
322,