int width1 = curwin->w_width - curwin_col_off();
int width2 = width1 + curwin_col_off2();
int size = 0;
- linenr_T prev_topline = curwin->w_topline;
colnr_T prev_skipcol = curwin->w_skipcol;
if (do_sms)
}
}
- // TODO: is comparing w_topline with prev_topline still needed?
- if (curwin->w_topline == prev_topline
- || curwin->w_skipcol != prev_skipcol)
- // need to redraw because wl_size of the topline may now be invalid
+ if (prev_skipcol > 0 || curwin->w_skipcol > 0)
+ // need to redraw more, because wl_size of the (new) topline may
+ // now be invalid
redraw_later(UPD_NOT_VALID);
}
else
let lines =<< trim END
setlocal cursorline scrolloff=0 smoothscroll
- call setline(1, repeat([''], 9))
+ call setline(1, repeat([''], 8))
call setline(3, repeat('a', 50))
- call setline(8, 'bbb')
- call setline(9, 'ccc')
+ call setline(4, repeat('a', 50))
+ call setline(7, 'bbb')
+ call setline(8, 'ccc')
redraw
END
call writefile(lines, 'XSmoothMultiSkipcol', 'D')
call term_sendkeys(buf, "3\<C-E>")
call VerifyScreenDump(buf, 'Test_smooth_multi_skipcol_2', {})
+ call term_sendkeys(buf, "2\<C-E>")
+ call VerifyScreenDump(buf, 'Test_smooth_multi_skipcol_3', {})
+
call StopVimInTerminal(buf)
endfunc