Problem: Crash when 'virtualedit' is set and window is narrow. ()
Solution: Check that width is not zero. (closes #8767)
if (finetune
&& curwin->w_p_wrap
&& curwin->w_width != 0
- && wcol >= (colnr_T)width)
+ && wcol >= (colnr_T)width
+ && width > 0)
{
csize = linetabsize(line);
if (csize > 0)
bw!
endfunc
+" This used to cause a divide by zero
+func Test_number_no_text_virtual_edit()
+ vnew
+ call setline(1, ['line one', 'line two'])
+ set number virtualedit=all
+ normal w
+ 4wincmd |
+ normal j
+ bwipe!
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 3357,
/**/
3356,
/**/