diff options
author | Thiago de Arruda <tpadilha84@gmail.com> | 2015-01-13 08:38:38 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2015-01-13 21:21:20 -0300 |
commit | 3e9c55b51b07fbde649f9e49d266cd0fc1121ad9 (patch) | |
tree | 31bce0a1941a301925f366eded6ab574c014541a /src/nvim/screen.c | |
parent | 8f3e61a043f6b1a3b22d56029ff878e54299ec7c (diff) | |
download | rneovim-3e9c55b51b07fbde649f9e49d266cd0fc1121ad9.tar.gz rneovim-3e9c55b51b07fbde649f9e49d266cd0fc1121ad9.tar.bz2 rneovim-3e9c55b51b07fbde649f9e49d266cd0fc1121ad9.zip |
main: Fix color schemes for abstract_ui
- Set 't_Co' to 256 at startup. The value can be changed by the user for
compatibility with terminals that are less capable.
- `has('gui_running')` will return 1 if at least one rgb UI is attached.
Even though these changes are hacky, they are necessary to make the transition
to the new UI architecture smoother.
Diffstat (limited to 'src/nvim/screen.c')
-rw-r--r-- | src/nvim/screen.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c index 5cfda13dbd..7d29cc7e2d 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -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,8 +6674,8 @@ static void linecopy(int to, int from, win_T *wp) */ int can_clear(char_u *p) { - return *p != NUL && (t_colors <= 1 - || cterm_normal_bg_color == 0 || *T_UT != NUL); + return abstract_ui || (*p != NUL && (t_colors <= 1 + || cterm_normal_bg_color == 0 || *T_UT != NUL)); } /* |