Skip to content

Commit 776c73e

Browse files
committed
Remove unnecessary MacVim-specific window clear
During merging from upstream Vim, I noticed that MacVim is doing some unnecessary clears. From looking at them, I don't think they are really necessary (at least with the current source revision). Such MacVim-specific changes add merge conflicts and makes it difficult to diagnose issues (as we need to determine if they are MacVim-specific or Vim). Just remove it for now. Can always add back if we see issues. The change was introduced in c621846.
1 parent 519b052 commit 776c73e

File tree

2 files changed

+1
-23
lines changed

2 files changed

+1
-23
lines changed

src/optiondefs.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1282,13 +1282,7 @@ static struct vimoption options[] =
12821282
(char_u *)NULL, PV_NONE, NULL,
12831283
#endif
12841284
{(char_u *)50L, (char_u *)0L} SCTX_INIT},
1285-
{"guioptions", "go", P_STRING|P_VI_DEF|P_RALL|P_FLAGLIST
1286-
# ifdef FEAT_GUI_MACVIM
1287-
/* Scrollbars etc. may change the view, if this happens without a
1288-
* redraw the display may get corrupted, so always redraw. */
1289-
|P_RCLR
1290-
# endif
1291-
,
1285+
{"guioptions", "go", P_STRING|P_VI_DEF|P_RALL|P_FLAGLIST,
12921286
#if defined(FEAT_GUI)
12931287
(char_u *)&p_go, PV_NONE, did_set_guioptions,
12941288
# ifdef FEAT_GUI_MACVIM

src/window.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1386,12 +1386,6 @@ win_split_ins(
13861386
// Both windows need redrawing. Update all status lines, in case they
13871387
// show something related to the window count or position.
13881388
redraw_win_later(wp, UPD_NOT_VALID);
1389-
#ifdef FEAT_GUI_MACVIM
1390-
if (gui.in_use)
1391-
// The view may have moved, so clear all or display may get corrupted.
1392-
redraw_win_later(oldwin, UPD_CLEAR);
1393-
else
1394-
#endif
13951389
redraw_win_later(oldwin, UPD_NOT_VALID);
13961390
status_redraw_all();
13971391

@@ -7053,10 +7047,6 @@ scroll_to_fraction(win_T *wp, int prev_height)
70537047
void
70547048
win_new_width(win_T *wp, int width)
70557049
{
7056-
#ifdef FEAT_GUI_MACVIM
7057-
int resized = wp->w_width != width;
7058-
#endif
7059-
70607050
// Should we give an error if width < 0?
70617051
wp->w_width = width < 0 ? 0 : width;
70627052
wp->w_lines_valid = 0;
@@ -7066,12 +7056,6 @@ win_new_width(win_T *wp, int width)
70667056
if (wp == curwin && *p_spk == 'c')
70677057
curs_columns(TRUE); // validate w_wrow
70687058

7069-
#ifdef FEAT_GUI_MACVIM
7070-
if (resized && gui.in_use)
7071-
// The view may have moved, so clear all or display may get corrupted.
7072-
redraw_win_later(wp, UPD_CLEAR);
7073-
else
7074-
#endif
70757059
redraw_win_later(wp, UPD_NOT_VALID);
70767060
wp->w_redr_status = TRUE;
70777061
}

0 commit comments

Comments
 (0)