summaryrefslogtreecommitdiffstats
path: root/src/misc1.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-03-17 23:19:38 +0000
committerBram Moolenaar <Bram@vim.org>2006-03-17 23:19:38 +0000
commitca003e1e4f94b4d0d9e0e1dda6cdf9d6045d14fb (patch)
tree97f7150d48975a7bd973de8c098a530c8a265664 /src/misc1.c
parent68f1a4864760dd13df508ebe6ceadd1d5bb5462c (diff)
updated for version 7.0227
Diffstat (limited to 'src/misc1.c')
-rw-r--r--src/misc1.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/misc1.c b/src/misc1.c
index 873159cc7c..00921dc9b4 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -2147,9 +2147,9 @@ del_chars(count, fixpos)
*/
/*ARGSUSED*/
int
-del_bytes(count, fixpos, use_delcombine)
+del_bytes(count, fixpos_arg, use_delcombine)
long count;
- int fixpos;
+ int fixpos_arg;
int use_delcombine; /* 'delcombine' option applies */
{
char_u *oldp, *newp;
@@ -2158,6 +2158,7 @@ del_bytes(count, fixpos, use_delcombine)
colnr_T col = curwin->w_cursor.col;
int was_alloced;
long movelen;
+ int fixpos = fixpos_arg;
oldp = ml_get(lnum);
oldlen = (int)STRLEN(oldp);
@@ -2201,9 +2202,14 @@ del_bytes(count, fixpos, use_delcombine)
{
/*
* If we just took off the last character of a non-blank line, and
- * fixpos is TRUE, we don't want to end up positioned at the NUL.
+ * fixpos is TRUE, we don't want to end up positioned at the NUL,
+ * unless "restart_edit" is set or 'virtualedit' contains "onemore".
*/
- if (col > 0 && fixpos)
+ if (col > 0 && fixpos && restart_edit == 0
+#ifdef FEAT_VIRTUALEDIT
+ && (ve_flags & VE_ONEMORE) == 0
+#endif
+ )
{
--curwin->w_cursor.col;
#ifdef FEAT_VIRTUALEDIT