diff options
author | Gregory Anders <8965202+gpanders@users.noreply.github.com> | 2023-12-06 10:55:50 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-06 10:55:50 -0800 |
commit | 08545bd45b80e3056fc8c6c4eb25e2ef1fddd897 (patch) | |
tree | 798ac51dc30ebc95617ffdbaaa4c474d70b3d226 /src/nvim/ui_client.c | |
parent | ca7f8786a0eb578895400e23cd21e25cc0f91800 (diff) | |
parent | a5a346678a8211ea07f318de42e557ad3909f65e (diff) | |
download | rneovim-08545bd45b80e3056fc8c6c4eb25e2ef1fddd897.tar.gz rneovim-08545bd45b80e3056fc8c6c4eb25e2ef1fddd897.tar.bz2 rneovim-08545bd45b80e3056fc8c6c4eb25e2ef1fddd897.zip |
Merge pull request #26407 from gpanders/default-tgc
feat(defaults): enable 'termguicolors' by default when supported by terminal
Diffstat (limited to 'src/nvim/ui_client.c')
-rw-r--r-- | src/nvim/ui_client.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/nvim/ui_client.c b/src/nvim/ui_client.c index eb32c16881..d744560a86 100644 --- a/src/nvim/ui_client.c +++ b/src/nvim/ui_client.c @@ -70,14 +70,14 @@ uint64_t ui_client_start_server(int argc, char **argv) return channel->id; } -void ui_client_attach(int width, int height, char *term) +void ui_client_attach(int width, int height, char *term, bool rgb) { MAXSIZE_TEMP_ARRAY(args, 3); ADD_C(args, INTEGER_OBJ(width)); ADD_C(args, INTEGER_OBJ(height)); MAXSIZE_TEMP_DICT(opts, 9); - PUT_C(opts, "rgb", BOOLEAN_OBJ(true)); + PUT_C(opts, "rgb", BOOLEAN_OBJ(rgb)); PUT_C(opts, "ext_linegrid", BOOLEAN_OBJ(true)); PUT_C(opts, "ext_termcolors", BOOLEAN_OBJ(true)); if (term) { @@ -111,9 +111,10 @@ void ui_client_run(bool remote_ui) ui_client_is_remote = remote_ui; int width, height; char *term; - tui_start(&tui, &width, &height, &term); + bool rgb; + tui_start(&tui, &width, &height, &term, &rgb); - ui_client_attach(width, height, term); + ui_client_attach(width, height, term, rgb); // os_exit() will be invoked when the client channel detaches while (true) { |