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.
diff --git a/src/normal.c b/src/normal.c
index c543635..f08f52f 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -1571,7 +1571,12 @@
oap->start = VIsual;
if (VIsual_mode == 'V')
+ {
oap->start.col = 0;
+# ifdef FEAT_VIRTUALEDIT
+ oap->start.coladd = 0;
+# endif
+ }
}
/*
@@ -7580,6 +7585,7 @@
if (!virtual_active())
curwin->w_cursor.coladd = 0;
#endif
+ check_cursor_col();
#ifdef FEAT_FOLDING
if (cap->oap->op_type == OP_NOP
&& pos != NULL