runtime(c): set omnifunc only for Vim, since it is Vim9 Script
Commit:
https://github.com/vim/vim/commit/b89ff6c2e125db413361a3e8abe3f43dcb5b412e
Author: Christian Brabandt <[email protected]>
Date: Fri Aug 8 13:43:35 2025 +0200
runtime(c): set omnifunc only for Vim, since it is Vim9 Script
related: https://github.com/vim/vim/issues/17871
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/runtime/ftplugin/c.vim b/runtime/ftplugin/c.vim
index 915861b8d..42a435f1d 100644
--- a/runtime/ftplugin/c.vim
+++ b/runtime/ftplugin/c.vim
@@ -1,8 +1,7 @@
" Vim filetype plugin file
" Language: C
" Maintainer: The Vim Project <https://github.com/vim/vim>
-" Last Change: 2023 Aug 22
-" 2024 Jun 02 by Riley Bruins <[email protected]>
('commentstring')
+" Last Change: 2025 Aug 08
" Former Maintainer: Bram Moolenaar <[email protected]>
" Only do this when not done yet for this buffer
@@ -28,7 +27,7 @@ setlocal fo-=t fo+=croql
setlocal commentstring=/*\ %s\ */ define& include&
" Set completion with CTRL-X CTRL-O to autoloaded function.
-if exists('&ofu')
+if exists('&ofu') && has("vim9script")
setlocal ofu=ccomplete#Complete
endif
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/vim_dev/E1ukLlZ-002NYU-O8%40256bit.org.