From 04274a417358a4eb9b3b3d1f7e1ea4a4b4419c5c Mon Sep 17 00:00:00 2001 From: Famiu Haque Date: Wed, 6 Nov 2024 04:07:29 +0600 Subject: refactor(options): remove unnecessary call to `find_option()` (#31088) --- src/nvim/option.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/nvim/option.c b/src/nvim/option.c index 783ec0abf4..cff8707edb 100644 --- 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); } } -- cgit