mirror of
https://github.com/neovim/neovim.git
synced 2025-09-24 03:58:32 +00:00
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.
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user