Problem: segfault in exmode when redrawing
Solution: skip gui_scroll when exmode_active
Signed-off-by: Christian Brabandt <cb@256bit.org>
* Scroll a window according to the values set in the globals
* "current_scrollbar" and "scrollbar_value".
* Return TRUE if the cursor in the current window moved or FALSE otherwise.
+ * may eventually cause a redraw using updateWindow
*/
int
gui_do_scroll(void)
if (wp == NULL)
// Couldn't find window
return FALSE;
+ // don't redraw, LineOffset and similar are not valid!
+ if (exmode_active)
+ return FALSE;
/*
* Compute number of lines to scroll. If zero, nothing to do.
--- /dev/null
+" this goes to insert mode and presses key k_VerScrollbar which may cause a redraw in exmode, which used ot crash Vim
+norm o\80ùX
\ ' || echo "crash 8: [OK]" >> X_crash1_result.txt' .. "\<cr>")
call TermWait(buf, 3000)
+ let file = 'crash/crash_scrollbar'
+ let args = printf(cmn_args, vim, file)
+ call term_sendkeys(buf, args ..
+ \ ' && echo "crash 9: [OK]" >> X_crash1_result.txt' .. "\<cr>")
+ call TermWait(buf, 1000)
+
" clean up
exe buf .. "bw!"
\ 'crash 6: [OK]',
\ 'crash 7: [OK]',
\ 'crash 8: [OK]',
+ \ 'crash 9: [OK]',
\ ]
call assert_equal(expected, getline(1, '$'))
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1992,
/**/
1991,
/**/