diff options
author | Thiago de Arruda <tpadilha84@gmail.com> | 2014-12-12 16:29:25 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2015-01-10 21:41:32 -0300 |
commit | 748920d505e2997c79e08d87d09c564eaea23a2f (patch) | |
tree | 20a275d44c1723d387875330c0873f594c9aed15 /src/nvim/screen.c | |
parent | 68151636065f9f23ea40dca826964ffafa29c283 (diff) | |
download | rneovim-748920d505e2997c79e08d87d09c564eaea23a2f.tar.gz rneovim-748920d505e2997c79e08d87d09c564eaea23a2f.tar.bz2 rneovim-748920d505e2997c79e08d87d09c564eaea23a2f.zip |
ui: Test for abstract_ui whenever a minimal t_colors value is required
t_colors should not be checked when abstract_ui is active, because nvim UI is
not limited to a terminal.
Diffstat (limited to 'src/nvim/screen.c')
-rw-r--r-- | src/nvim/screen.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c index 855c09619e..614f138e31 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -5971,7 +5971,7 @@ void screen_stop_highlight(void) */ void reset_cterm_colors(void) { - if (t_colors > 1) { + if (abstract_ui || t_colors > 1) { /* set Normal cterm colors */ if (cterm_normal_fg_color > 0 || cterm_normal_bg_color > 0) { out_str(T_OP); @@ -6150,8 +6150,7 @@ void screen_fill(int start_row, int end_row, int start_col, int end_col, int c1, return; /* it's a "normal" terminal when not in a GUI or cterm */ - norm_term = ( - t_colors <= 1); + norm_term = (!abstract_ui && t_colors <= 1); for (row = start_row; row < end_row; ++row) { if (has_mbyte ) { @@ -6675,7 +6674,7 @@ static void linecopy(int to, int from, win_T *wp) */ int can_clear(char_u *p) { - return *p != NUL && (t_colors <= 1 + return *p != NUL && ((!abstract_ui && t_colors <= 1) || cterm_normal_bg_color == 0 || *T_UT != NUL); } @@ -7702,8 +7701,7 @@ static void draw_tabline(void) int attr_fill = hl_attr(HLF_TPF); char_u *p; int room; - int use_sep_chars = (t_colors < 8 - ); + int use_sep_chars = !abstract_ui && t_colors < 8; redraw_tabline = FALSE; |