mirror of
https://github.com/neovim/neovim.git
synced 2025-11-27 12:40:39 +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:
@@ -114,6 +114,16 @@ void ui_write(uint8_t *s, int len)
|
||||
free(tofree);
|
||||
}
|
||||
|
||||
bool ui_rgb_attached(void)
|
||||
{
|
||||
for (size_t i = 0; i < ui_count; i++) {
|
||||
if (uis[i]->rgb) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* If the machine has job control, use it to suspend the program,
|
||||
* otherwise fake it by starting a new shell.
|
||||
|
||||
Reference in New Issue
Block a user