diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-08-19 15:05:32 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-08-19 15:05:32 +0200 |
commit | 9aa156912867c05e0a6480925afe11c590378f09 (patch) | |
tree | 8edcc2a13208a239bf234c32f6dde2e6fc0ad01e /src/normal.c | |
parent | 98ebd2bbec3443878dd0ed772ab67efb618f2fad (diff) | |
download | vim-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.c | 6 |
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 |