summaryrefslogtreecommitdiff
path: root/src/normal.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-08-19 15:05:32 +0200
committerBram Moolenaar <Bram@vim.org>2017-08-19 15:05:32 +0200
commit9aa156912867c05e0a6480925afe11c590378f09 (patch)
tree8edcc2a13208a239bf234c32f6dde2e6fc0ad01e /src/normal.c
parent98ebd2bbec3443878dd0ed772ab67efb618f2fad (diff)
downloadvim-git-9aa156912867c05e0a6480925afe11c590378f09.tar.gz
patch 8.0.0962: crash with virtualedit and joining linesv8.0.0962
Problem: Crash with virtualedit and joining lines. (Joshua T Corbin, Neovim #6726) Solution: When using a mark check that coladd is valid.
Diffstat (limited to 'src/normal.c')
-rw-r--r--src/normal.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/normal.c b/src/normal.c
index c543635ef..f08f52f9f 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -1571,7 +1571,12 @@ do_pending_operator(cmdarg_T *cap, int old_col, int gui_yank)
oap->start = VIsual;
if (VIsual_mode == 'V')
+ {
oap->start.col = 0;
+# ifdef FEAT_VIRTUALEDIT
+ oap->start.coladd = 0;
+# endif
+ }
}
/*
@@ -7580,6 +7585,7 @@ nv_gomark(cmdarg_T *cap)
if (!virtual_active())
curwin->w_cursor.coladd = 0;
#endif
+ check_cursor_col();
#ifdef FEAT_FOLDING
if (cap->oap->op_type == OP_NOP
&& pos != NULL