File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
44" Version: 16.0
55" Last Change: 2017 Oct 15
6+ " 2025 Nov 11 by Vim project: only set 'omnifunc' if dbext script was loaded #18716
67" Homepage: http://www.vim.org/scripts/script.php?script_id=1572
78" Usage: For detailed help
89" ":help sql.txt"
9899" Set completion with CTRL-X CTRL-O to autoloaded function.
99100" This check is in place in case this script is
100101" sourced directly instead of using the autoload feature.
101- if exists (' &omnifunc' )
102- " Do not set the option if already set since this
103- " results in an E117 warning.
104- if &omnifunc == " "
105- setlocal omnifunc = sqlcomplete#Complete
106- endif
102+ "
103+ " Do not set the option if already set since this
104+ " results in an E117 warning.
105+ if exists (' &omnifunc' ) && &omnifunc == " " && exists (' g:loaded_dbext' )
106+ setlocal omnifunc = sqlcomplete#Complete
107107endif
108108
109109if exists (' g:loaded_sql_completion' )
You can’t perform that action at this time.
0 commit comments