mirror of
https://github.com/neovim/neovim.git
synced 2025-10-08 19:06:31 +00:00
feat(api): ui options relevant for remote TUI
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#include "nvim/map.h"
|
||||
#include "nvim/memory.h"
|
||||
#include "nvim/msgpack_rpc/channel.h"
|
||||
#include "nvim/option.h"
|
||||
#include "nvim/popupmnu.h"
|
||||
#include "nvim/screen.h"
|
||||
#include "nvim/ui.h"
|
||||
@@ -255,6 +256,33 @@ static void ui_set_option(UI *ui, bool init, String name, Object value, Error *e
|
||||
return;
|
||||
}
|
||||
|
||||
if (strequal(name.data, "term_name")) {
|
||||
if (value.type != kObjectTypeString) {
|
||||
api_set_error(error, kErrorTypeValidation, "term_name must be a String");
|
||||
return;
|
||||
}
|
||||
set_tty_option("term", xstrdup(value.data.string.data));
|
||||
return;
|
||||
}
|
||||
|
||||
if (strequal(name.data, "term_colors")) {
|
||||
if (value.type != kObjectTypeInteger) {
|
||||
api_set_error(error, kErrorTypeValidation, "term_colors must be a Integer");
|
||||
return;
|
||||
}
|
||||
t_colors = (int)value.data.integer;
|
||||
return;
|
||||
}
|
||||
|
||||
if (strequal(name.data, "term_background")) {
|
||||
if (value.type != kObjectTypeString) {
|
||||
api_set_error(error, kErrorTypeValidation, "term_background must be a String");
|
||||
return;
|
||||
}
|
||||
set_tty_background(value.data.string.data);
|
||||
return;
|
||||
}
|
||||
|
||||
// LEGACY: Deprecated option, use `ext_cmdline` instead.
|
||||
bool is_popupmenu = strequal(name.data, "popupmenu_external");
|
||||
|
||||
|
Reference in New Issue
Block a user