Skip to content

Commit

Permalink
Merge pull request #656 from ichizok/fix/tui-screen
Browse files Browse the repository at this point in the history
Fix drawing screen in the case of TUI
  • Loading branch information
splhack committed Mar 24, 2018
2 parents 2288b39 + 994f163 commit 6dea0a8
Showing 1 changed file with 26 additions and 17 deletions.
43 changes: 26 additions & 17 deletions src/screen.c
Expand Up @@ -6166,9 +6166,11 @@ screen_line(
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)
if ((hl & HL_BOLD)
# ifdef FEAT_GUI_MACVIM /* see comment on subpixel antialiasing */
|| gui.in_use
# endif
)
redraw_this = TRUE;
}
#endif
Expand Down Expand Up @@ -6299,9 +6301,11 @@ screen_line(
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)
if ((hl & HL_BOLD)
# ifdef FEAT_GUI_MACVIM /* see comment on subpixel antialiasing */
|| gui.in_use
# endif
)
redraw_next = TRUE;
}
#endif
Expand Down Expand Up @@ -6387,9 +6391,11 @@ screen_line(
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))
if (hl > HL_ALL || (hl & HL_BOLD)
# ifdef FEAT_GUI_MACVIM /* see comment on subpixel antialiasing */
|| gui.in_use
# endif
)
{
int prev_cells = 1;
# ifdef FEAT_MBYTE
Expand Down Expand Up @@ -7591,9 +7597,11 @@ screen_puts_len(

if (n > HL_ALL)
n = syn_attr2attr(n);
# ifndef FEAT_GUI_MACVIM /* see comment on subpixel antialiasing */
if (n & HL_BOLD)
if ((n & HL_BOLD)
# ifdef FEAT_GUI_MACVIM /* see comment on subpixel antialiasing */
|| gui.in_use
# endif
)
force_redraw_next = TRUE;
}
#endif
Expand Down Expand Up @@ -8673,21 +8681,22 @@ screen_fill(
# endif
)
{
# ifndef FEAT_GUI_MACVIM
if (ScreenLines[off] != ' '
&& (ScreenAttrs[off] > HL_ALL
|| ScreenAttrs[off] & HL_BOLD))
force_next = TRUE;
else
force_next = FALSE;
# else
# ifdef FEAT_GUI_MACVIM
/* 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] != ' ');
if (gui.in_use)
force_next = (ScreenLines[off] != ' ');
else
# endif
if (ScreenLines[off] != ' '
&& (ScreenAttrs[off] > HL_ALL
|| ScreenAttrs[off] & HL_BOLD))
force_next = TRUE;
else
force_next = FALSE;
}
#endif
ScreenLines[off] = c;
Expand Down

0 comments on commit 6dea0a8

Please sign in to comment.