summaryrefslogtreecommitdiffstats
path: root/runtime/autoload
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-02-01 22:37:05 +0100
committerBram Moolenaar <Bram@vim.org>2016-02-01 22:37:05 +0100
commit5e9b2fa9bb0e6061cf18457c173cd141a5dc9c92 (patch)
tree7d43f24e26507bdf133aa825e5f6ada25669985b /runtime/autoload
parent488a130ea261f02317adc2c2ca93cc6e68cf2c23 (diff)
Updated runtime files and translations.
Diffstat (limited to 'runtime/autoload')
-rw-r--r--runtime/autoload/sqlcomplete.vim35
1 files changed, 32 insertions, 3 deletions
diff --git a/runtime/autoload/sqlcomplete.vim b/runtime/autoload/sqlcomplete.vim
index 9326c15bb3..f7e86a9d0e 100644
--- a/runtime/autoload/sqlcomplete.vim
+++ b/runtime/autoload/sqlcomplete.vim
@@ -1,8 +1,8 @@
" Vim OMNI completion script for SQL
" Language: SQL
" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
-" Version: 15.0
-" Last Change: 2013 May 13
+" Version: 16.0
+" Last Change: 2015 Dec 29
" Homepage: http://www.vim.org/scripts/script.php?script_id=1572
" Usage: For detailed help
" ":help sql.txt"
@@ -16,6 +16,12 @@
" look backwards to a FROM clause and find the first table
" and complete it.
"
+" Version 16.0 (Dec 2015)
+" - NF: If reseting the cache and table, procedure or view completion
+" had been used via dbext, have dbext delete or recreate the
+" dictionary so that new objects are picked up for the
+" next completion.
+"
" Version 15.0 (May 2013)
" - NF: Changed the SQL precached syntax items, omni_sql_precache_syntax_groups,
" to use regular expressions to pick up extended syntax group names.
@@ -103,7 +109,7 @@ endif
if exists('g:loaded_sql_completion')
finish
endif
-let g:loaded_sql_completion = 150
+let g:loaded_sql_completion = 160
let s:keepcpo= &cpo
set cpo&vim
@@ -459,6 +465,29 @@ function! sqlcomplete#Complete(findstart, base)
let s:tbl_cols = []
let s:syn_list = []
let s:syn_value = []
+
+ if s:sql_file_table != ""
+ if g:loaded_dbext >= 2300
+ call DB_DictionaryDelete("table")
+ else
+ DBCompleteTables!
+ endif
+ endif
+ if s:sql_file_procedure != ""
+ if g:loaded_dbext >= 2300
+ call DB_DictionaryDelete("procedure")
+ else
+ DBCompleteProcedures!
+ endif
+ endif
+ if s:sql_file_view != ""
+ if g:loaded_dbext >= 2300
+ call DB_DictionaryDelete("view")
+ else
+ DBCompleteViews!
+ endif
+ endif
+
let s:sql_file_table = ""
let s:sql_file_procedure = ""
let s:sql_file_view = ""