Skip to content

Commit b89ff6c

Browse files
committed
runtime(c): set omnifunc only for Vim, since it is Vim9 Script
related: #17871 Signed-off-by: Christian Brabandt <cb@256bit.org>
1 parent fa2bcbd commit b89ff6c

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

runtime/ftplugin/c.vim

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
" Vim filetype plugin file
22
" Language: C
33
" Maintainer: The Vim Project <https://github.com/vim/vim>
4-
" Last Change: 2023 Aug 22
5-
" 2024 Jun 02 by Riley Bruins <ribru17@gmail.com> ('commentstring')
4+
" Last Change: 2025 Aug 08
65
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
76

87
" Only do this when not done yet for this buffer
@@ -28,7 +27,7 @@ setlocal fo-=t fo+=croql
2827
setlocal commentstring=/*\ %s\ */ define& include&
2928

3029
" Set completion with CTRL-X CTRL-O to autoloaded function.
31-
if exists('&ofu')
30+
if exists('&ofu') && has("vim9script")
3231
setlocal ofu=ccomplete#Complete
3332
endif
3433

0 commit comments

Comments
 (0)