diff options
author | bfredl <bjorn.linse@gmail.com> | 2024-02-09 11:42:40 +0100 |
---|---|---|
committer | bfredl <bjorn.linse@gmail.com> | 2024-02-09 15:11:21 +0100 |
commit | e0e5b7f0ba1b0440bdc2b557e2b2cfae24706cbd (patch) | |
tree | e323ac2fd3a1dc9619265f7daa069ba9a66d8f2b /src/nvim/ui.c | |
parent | 4788abf2da6bb5c37e880d74a73a4a7de736b6ac (diff) | |
download | rneovim-e0e5b7f0ba1b0440bdc2b557e2b2cfae24706cbd.tar.gz rneovim-e0e5b7f0ba1b0440bdc2b557e2b2cfae24706cbd.tar.bz2 rneovim-e0e5b7f0ba1b0440bdc2b557e2b2cfae24706cbd.zip |
refactor(api): make cstr_as_string accept "const char*"
In the context a String inside an Object/Dictionary etc is consumed,
it is considered to be read-only.
Diffstat (limited to 'src/nvim/ui.c')
-rw-r--r-- | src/nvim/ui.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/nvim/ui.c b/src/nvim/ui.c index 2744f68951..ca0ec1e4ab 100644 --- a/src/nvim/ui.c +++ b/src/nvim/ui.c @@ -229,7 +229,7 @@ void ui_refresh(void) } ui_ext[i] = ext_widgets[i]; if (i < kUIGlobalCount) { - ui_call_option_set(cstr_as_string((char *)ui_ext_names[i]), + ui_call_option_set(cstr_as_string(ui_ext_names[i]), BOOLEAN_OBJ(ext_widgets[i])); } } @@ -451,8 +451,7 @@ void ui_set_ext_option(UI *ui, UIExtension ext, bool active) return; } if (ui_ext_names[ext][0] != '_' || active) { - remote_ui_option_set(ui, cstr_as_string((char *)ui_ext_names[ext]), - BOOLEAN_OBJ(active)); + remote_ui_option_set(ui, cstr_as_string(ui_ext_names[ext]), BOOLEAN_OBJ(active)); } if (ext == kUITermColors) { ui_default_colors_set(); |