summaryrefslogtreecommitdiff
path: root/src/ops.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2005-11-23 21:25:05 +0000
committerBram Moolenaar <Bram@vim.org>2005-11-23 21:25:05 +0000
commita5792f58905da28f0ab37e1c4c3cfd8171b2e602 (patch)
tree258ddcfde89bbf98b90d42dd6c297e1b22a20d09 /src/ops.c
parentaf289d333a2985051948a53d510fa345df1ddeb3 (diff)
downloadvim-git-a5792f58905da28f0ab37e1c4c3cfd8171b2e602.tar.gz
updated for version 7.0158v7.0158
Diffstat (limited to 'src/ops.c')
-rw-r--r--src/ops.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/ops.c b/src/ops.c
index a88c90739..8c239da13 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -3724,13 +3724,17 @@ end:
&& curwin->w_cursor.col > 0
&& !(restart_edit || (State & INSERT)))
{
-#ifdef FEAT_VIRTUALEDIT
- col = curwin->w_cursor.col;
-#endif
+ /* Put the cursor on the last character in the line. */
dec_cursor();
#ifdef FEAT_VIRTUALEDIT
if (ve_flags == VE_ALL)
- curwin->w_cursor.coladd = col - curwin->w_cursor.col;
+ {
+ colnr_T scol, ecol;
+
+ /* Coladd is set to the width of the last character. */
+ getvcol(curwin, &curwin->w_cursor, &scol, NULL, &ecol);
+ curwin->w_cursor.coladd = ecol - scol + 1;
+ }
#endif
}
}