summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2007-04-26 08:54:21 +0000
committerBram Moolenaar <Bram@vim.org>2007-04-26 08:54:21 +0000
commit87c199649156af12e70c2e0448d7102077f961cc (patch)
tree83de01c22f822af7b927abbbb42abaec7d38ee39
parent63b9254b8e38329d98f5400339ec563abd953444 (diff)
updated for version 7.0-225v7.0.225
-rw-r--r--src/eval.c3
-rw-r--r--src/misc2.c7
-rw-r--r--src/version.c2
3 files changed, 11 insertions, 1 deletions
diff --git a/src/eval.c b/src/eval.c
index e895b997b9..d66fe57f40 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -14397,7 +14397,8 @@ f_setline(argvars, rettv)
if (u_savesub(lnum) == OK && ml_replace(lnum, line, TRUE) == OK)
{
changed_bytes(lnum, 0);
- check_cursor_col();
+ if (lnum == curwin->w_cursor.lnum)
+ check_cursor_col();
rettv->vval.v_number = 0; /* OK */
}
}
diff --git a/src/misc2.c b/src/misc2.c
index 14c4784cf2..cdff6abada 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -516,7 +516,14 @@ check_cursor_col()
|| virtual_active())
curwin->w_cursor.col = len;
else
+ {
curwin->w_cursor.col = len - 1;
+#ifdef FEAT_MBYTE
+ /* prevent cursor from moving on the trail byte */
+ if (has_mbyte)
+ mb_adjust_cursor();
+#endif
+ }
}
#ifdef FEAT_VIRTUALEDIT
diff --git a/src/version.c b/src/version.c
index 3c8b1733e4..47f2f33def 100644
--- a/src/version.c
+++ b/src/version.c
@@ -667,6 +667,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 225,
+/**/
224,
/**/
223,