patch 8.0.0339: illegal memory access with vi'
Problem: Illegal memory access with vi'
Solution: For quoted text objects bail out if the Visual area spans more
than one line.
diff --git a/src/search.c b/src/search.c
index 6e62184..83c5842 100644
--- a/src/search.c
+++ b/src/search.c
@@ -4357,6 +4357,10 @@
/* Correct cursor when 'selection' is exclusive */
if (VIsual_active)
{
+ /* this only works within one line */
+ if (VIsual.lnum != curwin->w_cursor.lnum)
+ return FALSE;
+
vis_bef_curs = lt(VIsual, curwin->w_cursor);
if (*p_sel == 'e' && vis_bef_curs)
dec_cursor();