magic_overruled = is_state->magic_overruled_save;
validate_cursor(); // needed for TAB
+ status_redraw_all();
redraw_all_later(UPD_SOME_VALID);
if (call_update_screen)
update_screen(UPD_SOME_VALID);
}
validate_cursor();
+
// May redraw the status line to show the cursor position.
if (p_ru && curwin->w_status_height > 0)
curwin->w_redr_status = TRUE;
}
#endif
+/*
+ * Set curwin->s_skipcol to zero and redraw later if needed.
+ */
+ static void
+reset_skipcol(void)
+{
+ if (curwin->w_skipcol != 0)
+ {
+ curwin->w_skipcol = 0;
+
+ // Should use the least expensive way that displays all that changed.
+ // UPD_NOT_VALID is too expensive, UPD_REDRAW_TOP does not redraw
+ // enough when the top line gets another screen line.
+ redraw_later(UPD_SOME_VALID);
+ }
+}
+
/*
* Update curwin->w_topline and redraw if necessary.
* Used to update the screen before printing a message.
)
{
dollar_vcol = -1;
- if (curwin->w_skipcol != 0)
- {
- curwin->w_skipcol = 0;
- redraw_later(UPD_NOT_VALID);
- }
- else
- redraw_later(UPD_VALID);
+ redraw_later(UPD_VALID);
+ reset_skipcol();
+
// May need to set w_skipcol when cursor in w_topline.
if (curwin->w_cursor.lnum == curwin->w_topline)
validate_cursor();
else if (!curwin->w_p_sms)
curwin->w_skipcol = 0;
if (prev_skipcol != curwin->w_skipcol)
- redraw_later(UPD_NOT_VALID);
+ redraw_later(UPD_SOME_VALID);
#ifdef FEAT_SYN_HL
redraw_for_cursorcolumn(curwin);
if (curwin->w_cline_height == curwin->w_height)
{
// the line just fits in the window, don't scroll
- if (curwin->w_skipcol != 0)
- {
- curwin->w_skipcol = 0;
- redraw_later(UPD_NOT_VALID);
- }
+ reset_skipcol();
return;
}
#endif
// TODO: if the line doesn't fit may optimize w_skipcol
if (curwin->w_topline == curwin->w_cursor.lnum)
- {
- curwin->w_skipcol = 0;
- redraw_later(UPD_NOT_VALID);
- }
+ reset_skipcol();
if (curwin->w_topline != old_topline
|| curwin->w_skipcol != old_skipcol
#ifdef FEAT_DIFF
if (curwin->w_cline_height == curwin->w_height)
{
// The cursor line just fits in the window, don't scroll.
- curwin->w_skipcol = 0;
+ reset_skipcol();
return;
}
// TODO: If the cursor line doesn't fit in the window then only adjust