aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-08-06 22:20:26 +0800
committerGitHub <noreply@github.com>2024-08-06 22:20:26 +0800
commit93347a67bf913c72ab2c1ba0aa4b26cc4ba6d1a8 (patch)
tree025422962c9114120adaf16db8241cfd4e1c8c9c /src
parent37952bf7b442cac794c4663f2e0123e7d72bc443 (diff)
downloadrneovim-93347a67bf913c72ab2c1ba0aa4b26cc4ba6d1a8.tar.gz
rneovim-93347a67bf913c72ab2c1ba0aa4b26cc4ba6d1a8.tar.bz2
rneovim-93347a67bf913c72ab2c1ba0aa4b26cc4ba6d1a8.zip
fix(filetype): fix :filetype detect error with -u NONE (#29991)
:filetype detect should enable filetype detection when it hasn't been enabled before.
Diffstat (limited to 'src')
-rw-r--r--src/nvim/ex_docmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index 2142199c8a..b5a5a0f466 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -7330,7 +7330,7 @@ static void ex_filetype(exarg_T *eap)
break;
}
if (strcmp(arg, "on") == 0 || strcmp(arg, "detect") == 0) {
- if (*arg == 'o' || !filetype_detect) {
+ if (*arg == 'o' || filetype_detect != kTrue) {
source_runtime(FILETYPE_FILE, DIP_ALL);
filetype_detect = kTrue;
if (plugin) {