mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-11 15:37:29 +02:00
Avoid unnecessary clearing of the status line
When resizing a (Vim-) window don't use the CLEAR flag as it causes the status line to be redrawn (which causes problems for plugins like Command-T). The reason CLEAR was used in the first place was because resizing a window would cause display corruption due to wide letters like "w" spilling over into the neigboring display cell. To circumvent this problem we now always clear neigboring blank cells whenever a cell is cleared (just like other GUIs deal with faked bold glyphs spilling over into neighboring display cells).
This commit is contained in:
@@ -5432,7 +5432,9 @@ screen_line(row, coloff, endcol, clear_width
|
||||
hl = ScreenAttrs[off_to + CHAR_CELLS];
|
||||
if (hl > HL_ALL)
|
||||
hl = syn_attr2attr(hl);
|
||||
# ifndef FEAT_GUI_MACVIM /* see comment on subpixel antialiasing */
|
||||
if (hl & HL_BOLD)
|
||||
# endif
|
||||
redraw_this = TRUE;
|
||||
}
|
||||
#endif
|
||||
@@ -5563,7 +5565,9 @@ screen_line(row, coloff, endcol, clear_width
|
||||
hl = ScreenAttrs[off_to];
|
||||
if (hl > HL_ALL)
|
||||
hl = syn_attr2attr(hl);
|
||||
# ifndef FEAT_GUI_MACVIM /* see comment on subpixel antialiasing */
|
||||
if (hl & HL_BOLD)
|
||||
# endif
|
||||
redraw_next = TRUE;
|
||||
}
|
||||
#endif
|
||||
@@ -5649,7 +5653,9 @@ screen_line(row, coloff, endcol, clear_width
|
||||
if (gui.in_use && (col > startCol || !redraw_this))
|
||||
{
|
||||
hl = ScreenAttrs[off_to];
|
||||
# ifndef FEAT_GUI_MACVIM /* see comment on subpixel antialiasing */
|
||||
if (hl > HL_ALL || (hl & HL_BOLD))
|
||||
# endif
|
||||
{
|
||||
int prev_cells = 1;
|
||||
# ifdef FEAT_MBYTE
|
||||
@@ -6876,7 +6882,9 @@ screen_puts_len(text, len, row, col, attr)
|
||||
|
||||
if (n > HL_ALL)
|
||||
n = syn_attr2attr(n);
|
||||
# ifndef FEAT_GUI_MACVIM /* see comment on subpixel antialiasing */
|
||||
if (n & HL_BOLD)
|
||||
# endif
|
||||
force_redraw_next = TRUE;
|
||||
}
|
||||
#endif
|
||||
@@ -7751,6 +7759,12 @@ screen_fill(start_row, end_row, start_col, end_col, c1, c2, attr)
|
||||
|| ScreenAttrs[off] != attr
|
||||
#if defined(FEAT_GUI) || defined(UNIX)
|
||||
|| force_next
|
||||
#endif
|
||||
#ifdef FEAT_GUI_MACVIM
|
||||
/* force a clear if the next char will be cleared (see
|
||||
* comment on subpixel antialiasing) */
|
||||
|| (gui.in_use && col+1 < end_col
|
||||
&& ScreenLines[off+1] != c)
|
||||
#endif
|
||||
)
|
||||
{
|
||||
@@ -7771,12 +7785,21 @@ screen_fill(start_row, end_row, start_col, end_col, c1, c2, attr)
|
||||
# endif
|
||||
)
|
||||
{
|
||||
# ifndef FEAT_GUI_MACVIM
|
||||
if (ScreenLines[off] != ' '
|
||||
&& (ScreenAttrs[off] > HL_ALL
|
||||
|| ScreenAttrs[off] & HL_BOLD))
|
||||
force_next = TRUE;
|
||||
else
|
||||
force_next = FALSE;
|
||||
# else
|
||||
/* Mac OS X does subpixel antialiasing which often causes a
|
||||
* glyph to spill over into neighboring cells. For this
|
||||
* reason we always clear the neighboring glyphs whenever a
|
||||
* glyph is cleared, just like other GUIs cope with the
|
||||
* bold trick. */
|
||||
force_next = (ScreenLines[off] != ' ');
|
||||
# endif
|
||||
}
|
||||
#endif
|
||||
ScreenLines[off] = c;
|
||||
|
||||
@@ -5612,12 +5612,7 @@ win_new_height(wp, height)
|
||||
wp->w_prev_fraction_row = wp->w_wrow;
|
||||
|
||||
win_comp_scroll(wp);
|
||||
#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, SOME_VALID);
|
||||
#endif
|
||||
#ifdef FEAT_WINDOWS
|
||||
wp->w_redr_status = TRUE;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user