diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-02-07 02:29:30 -0500 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-02-07 17:27:59 -0500 |
commit | f1fdeaf667033751378f6e1e29a6039e15de503e (patch) | |
tree | 481a0e1491a2e82bcdbd40160d4303c453381402 /src/nvim/ex_docmd.c | |
parent | a7d9df996dc1c353574845563216dc0372dd8b77 (diff) | |
download | rneovim-f1fdeaf667033751378f6e1e29a6039e15de503e.tar.gz rneovim-f1fdeaf667033751378f6e1e29a6039e15de503e.tar.bz2 rneovim-f1fdeaf667033751378f6e1e29a6039e15de503e.zip |
option: use char* for set_string_option_direct()
"name" param was cast to (const char *).
All calls to set_string_option_direct() cast 1st arg
from (char *) to (char_u *).
Remove these useless casts.
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r-- | src/nvim/ex_docmd.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index f55344e77e..f63fc8610c 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -2179,7 +2179,7 @@ int parse_command_modifiers(exarg_T *eap, char_u **errormsg, bool skip_only) // Set 'eventignore' to "all". Restore the // existing option value later. cmdmod.save_ei = vim_strsave(p_ei); - set_string_option_direct((char_u *)"ei", -1, + set_string_option_direct("ei", -1, (char_u *)"all", OPT_FREE, SID_NONE); } continue; @@ -2291,9 +2291,8 @@ static void undo_cmdmod(const exarg_T *eap, int save_msg_scroll) } if (cmdmod.save_ei != NULL) { - /* Restore 'eventignore' to the value before ":noautocmd". */ - set_string_option_direct((char_u *)"ei", -1, cmdmod.save_ei, - OPT_FREE, SID_NONE); + // Restore 'eventignore' to the value before ":noautocmd". + set_string_option_direct("ei", -1, cmdmod.save_ei, OPT_FREE, SID_NONE); free_string_option(cmdmod.save_ei); } |