commit 04274a417358a4eb9b3b3d1f7e1ea4a4b4419c5c
parent ba40a6dbe3a1c98a9f75e56c7cd08ecd522d27dd
Author: Famiu Haque <famiuhaque@proton.me>
Date: Wed, 6 Nov 2024 04:07:29 +0600
refactor(options): remove unnecessary call to `find_option()` (#31088)
Diffstat:
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/nvim/option.c b/src/nvim/option.c
@@ -649,10 +649,8 @@ void set_init_3(void)
xfree(p);
if (buf_is_empty(curbuf)) {
- int idx_ffs = find_option("ffs");
-
// Apply the first entry of 'fileformats' to the initial buffer.
- if (idx_ffs >= 0 && (options[idx_ffs].flags & kOptFlagWasSet)) {
+ if (options[kOptFileformats].flags & kOptFlagWasSet) {
set_fileformat(default_fileformat(), OPT_LOCAL);
}
}