aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_cmds.c
diff options
context:
space:
mode:
authorFamiu Haque <famiuhaque@proton.me>2024-01-10 04:15:22 +0600
committerGitHub <noreply@github.com>2024-01-10 06:15:22 +0800
commit10f36af84d4ccb0b626cd6c79c6ba2f2735a56fd (patch)
treecffc1614f18b97712a9fb332deba53a7b21dc0a4 /src/nvim/ex_cmds.c
parent501cf323575864c847be892da1197daa8c3771a1 (diff)
downloadrneovim-10f36af84d4ccb0b626cd6c79c6ba2f2735a56fd.tar.gz
rneovim-10f36af84d4ccb0b626cd6c79c6ba2f2735a56fd.tar.bz2
rneovim-10f36af84d4ccb0b626cd6c79c6ba2f2735a56fd.zip
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`.
Diffstat (limited to 'src/nvim/ex_cmds.c')
-rw-r--r--src/nvim/ex_cmds.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c
index 4d86b4d478..7abc8354aa 100644
--- a/src/nvim/ex_cmds.c
+++ b/src/nvim/ex_cmds.c
@@ -4266,7 +4266,7 @@ skip:
// Show 'inccommand' preview if there are matched lines.
if (cmdpreview_ns > 0 && !aborting()) {
if (got_quit || profile_passed_limit(timeout)) { // Too slow, disable.
- set_string_option_direct(kOptInccommand, "", OPT_FREE, SID_NONE);
+ set_string_option_direct(kOptInccommand, "", 0, SID_NONE);
} else if (*p_icm != NUL && pat != NULL) {
if (pre_hl_id == 0) {
pre_hl_id = syn_check_group(S_LEN("Substitute"));
@@ -4546,7 +4546,7 @@ bool prepare_tagpreview(bool undo_sync)
RESET_BINDING(curwin); // don't take over 'scrollbind' and 'cursorbind'
curwin->w_p_diff = false; // no 'diff'
- set_string_option_direct(kOptFoldcolumn, "0", OPT_FREE, SID_NONE); // no 'foldcolumn'
+ set_string_option_direct(kOptFoldcolumn, "0", 0, SID_NONE); // no 'foldcolumn'
return true;
}
@@ -4565,7 +4565,7 @@ static int show_sub(exarg_T *eap, pos_T old_cusr, PreviewLines *preview_lines, i
buf_T *cmdpreview_buf = NULL;
// disable file info message
- set_string_option_direct(kOptShortmess, "F", OPT_FREE, SID_NONE);
+ set_string_option_direct(kOptShortmess, "F", 0, SID_NONE);
// Update the topline to ensure that main window is on the correct line
update_topline(curwin);
@@ -4666,7 +4666,7 @@ static int show_sub(exarg_T *eap, pos_T old_cusr, PreviewLines *preview_lines, i
xfree(str);
- set_string_option_direct(kOptShortmess, save_shm_p, OPT_FREE, SID_NONE);
+ set_string_option_direct(kOptShortmess, save_shm_p, 0, SID_NONE);
xfree(save_shm_p);
return preview ? 2 : 1;