mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 22:18:33 +00:00
refactor(options): remove OPT_FREE
(#26963)
Problem: `OPT_FREE` macro doesn't seem to do anything as `P_ALLOCED` already handles allocations. Solution: Remove `OPT_FREE`.
This commit is contained in:
@@ -2654,7 +2654,7 @@ static void apply_cmdmod(cmdmod_T *cmod)
|
||||
// Set 'eventignore' to "all".
|
||||
// First save the existing option value for restoring it later.
|
||||
cmod->cmod_save_ei = xstrdup(p_ei);
|
||||
set_string_option_direct(kOptEventignore, "all", OPT_FREE, SID_NONE);
|
||||
set_string_option_direct(kOptEventignore, "all", 0, SID_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2674,7 +2674,7 @@ void undo_cmdmod(cmdmod_T *cmod)
|
||||
|
||||
if (cmod->cmod_save_ei != NULL) {
|
||||
// Restore 'eventignore' to the value before ":noautocmd".
|
||||
set_string_option_direct(kOptEventignore, cmod->cmod_save_ei, OPT_FREE, SID_NONE);
|
||||
set_string_option_direct(kOptEventignore, cmod->cmod_save_ei, 0, SID_NONE);
|
||||
free_string_option(cmod->cmod_save_ei);
|
||||
cmod->cmod_save_ei = NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user