mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-11 15:37:29 +02:00
Avoid display corruption on :vsp and 'go' changes
Always redraw the screen when splitting vertically or when the 'go' option is modified (it may e.g. cause scrollbars to hide/show).
This commit is contained in:
+7
-1
@@ -1277,7 +1277,13 @@ static struct vimoption
|
|||||||
(char_u *)NULL, PV_NONE,
|
(char_u *)NULL, PV_NONE,
|
||||||
#endif
|
#endif
|
||||||
{(char_u *)50L, (char_u *)0L} SCRIPTID_INIT},
|
{(char_u *)50L, (char_u *)0L} SCRIPTID_INIT},
|
||||||
{"guioptions", "go", P_STRING|P_VI_DEF|P_RALL|P_FLAGLIST,
|
{"guioptions", "go", P_STRING|P_VI_DEF|P_RALL|P_FLAGLIST
|
||||||
|
# ifdef FEAT_GUI_MACVIM
|
||||||
|
/* Scrollbars etc. may change the view, if this happens without a
|
||||||
|
* redraw the display may get corrupted, so always redraw. */
|
||||||
|
|P_RCLR
|
||||||
|
# endif
|
||||||
|
,
|
||||||
#if defined(FEAT_GUI)
|
#if defined(FEAT_GUI)
|
||||||
(char_u *)&p_go, PV_NONE,
|
(char_u *)&p_go, PV_NONE,
|
||||||
# if defined(UNIX) && !defined(MACOS)
|
# if defined(UNIX) && !defined(MACOS)
|
||||||
|
|||||||
@@ -1097,7 +1097,12 @@ win_split_ins(size, flags, newwin, dir)
|
|||||||
*/
|
*/
|
||||||
redraw_win_later(wp, NOT_VALID);
|
redraw_win_later(wp, NOT_VALID);
|
||||||
wp->w_redr_status = TRUE;
|
wp->w_redr_status = TRUE;
|
||||||
|
#ifdef FEAT_GUI_MACVIM
|
||||||
|
/* The view may have moved, so clear all or display may get corrupted. */
|
||||||
|
redraw_win_later(oldwin, CLEAR);
|
||||||
|
#else
|
||||||
redraw_win_later(oldwin, NOT_VALID);
|
redraw_win_later(oldwin, NOT_VALID);
|
||||||
|
#endif
|
||||||
oldwin->w_redr_status = TRUE;
|
oldwin->w_redr_status = TRUE;
|
||||||
|
|
||||||
if (need_status)
|
if (need_status)
|
||||||
@@ -5575,7 +5580,12 @@ win_new_width(wp, width)
|
|||||||
update_topline();
|
update_topline();
|
||||||
curs_columns(TRUE); /* validate w_wrow */
|
curs_columns(TRUE); /* validate w_wrow */
|
||||||
}
|
}
|
||||||
|
#ifdef FEAT_GUI_MACVIM
|
||||||
|
/* The view may have moved, so clear all or display may get corrupted. */
|
||||||
|
redraw_win_later(wp, CLEAR);
|
||||||
|
#else
|
||||||
redraw_win_later(wp, NOT_VALID);
|
redraw_win_later(wp, NOT_VALID);
|
||||||
|
#endif
|
||||||
wp->w_redr_status = TRUE;
|
wp->w_redr_status = TRUE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user