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/main.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/main.c')
-rw-r--r-- | src/nvim/main.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/nvim/main.c b/src/nvim/main.c index f063cc1238..7ca26a6eba 100644 --- a/src/nvim/main.c +++ b/src/nvim/main.c @@ -261,10 +261,7 @@ int main(int argc, char **argv) if (params.want_full_screen && !silent_mode) { if (embedded_mode) { - // In embedded mode don't do terminal-related initializations, assume an - // initial screen size of 80x20 - full_screen = true; - screen_resize(80, 20, false); + // embedded mode implies abstract_ui termcapinit((uint8_t *)"abstract_ui"); } else { // set terminal name and get terminal capabilities (will set full_screen) @@ -278,7 +275,9 @@ int main(int argc, char **argv) event_init(); if (abstract_ui) { + full_screen = true; t_colors = 256; + T_CCO = (uint8_t *)"256"; } else { // Print a warning if stdout is not a terminal TODO(tarruda): Remove this // check once the new terminal UI is implemented |