diff options
author | Famiu Haque <famiuhaque@proton.me> | 2024-01-10 04:15:22 +0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-10 06:15:22 +0800 |
commit | 10f36af84d4ccb0b626cd6c79c6ba2f2735a56fd (patch) | |
tree | cffc1614f18b97712a9fb332deba53a7b21dc0a4 /src/nvim/fileio.c | |
parent | 501cf323575864c847be892da1197daa8c3771a1 (diff) | |
download | rneovim-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/fileio.c')
-rw-r--r-- | src/nvim/fileio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index 008cd9c222..85656650b6 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -1611,7 +1611,7 @@ failed: save_file_ff(curbuf); // If editing a new file: set 'fenc' for the current buffer. // Also for ":read ++edit file". - set_string_option_direct(kOptFileencoding, fenc, OPT_FREE | OPT_LOCAL, 0); + set_string_option_direct(kOptFileencoding, fenc, OPT_LOCAL, 0); } if (fenc_alloced) { xfree(fenc); @@ -1959,7 +1959,7 @@ void set_forced_fenc(exarg_T *eap) } char *fenc = enc_canonize(eap->cmd + eap->force_enc); - set_string_option_direct(kOptFileencoding, fenc, OPT_FREE|OPT_LOCAL, 0); + set_string_option_direct(kOptFileencoding, fenc, OPT_LOCAL, 0); xfree(fenc); } |