1
0
forked from aniani/vim

patch 8.0.0962: crash with virtualedit and joining lines

Problem:    Crash with virtualedit and joining lines. (Joshua T Corbin, Neovim
            #6726)
Solution:   When using a mark check that coladd is valid.
This commit is contained in:
Bram Moolenaar
2017-08-19 15:05:32 +02:00
parent 98ebd2bbec
commit 9aa1569128
6 changed files with 52 additions and 0 deletions

View File

@@ -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