aboutsummaryrefslogtreecommitdiff
path: root/runtime/autoload/sqlcomplete.vim
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2016-06-04 21:45:09 -0400
committerJames McCoy <jamessan@jamessan.com>2016-06-07 06:46:36 -0400
commit404dc5420b7cacd251d15f273bafe59ff008b9a6 (patch)
tree7b860261ea47f90eb9e3dcc59e0a6eeae1af4f51 /runtime/autoload/sqlcomplete.vim
parent374b3a6f4cb941b3cd762f68cd8f6b4ed4a3e560 (diff)
downloadrneovim-404dc5420b7cacd251d15f273bafe59ff008b9a6.tar.gz
rneovim-404dc5420b7cacd251d15f273bafe59ff008b9a6.tar.bz2
rneovim-404dc5420b7cacd251d15f273bafe59ff008b9a6.zip
vim-patch:5e9b2fa
Updated runtime files and translations. https://github.com/vim/vim/commit/5e9b2fa9bb0e6061cf18457c173cd141a5dc9c92 Ignore changes to * doc/tags: generated at build time * doc/develop.txt, doc/todo.txt, doc/netbeans.txt, doc/vim-ja.UTF-8.1, doc/xxd-ja.UTF-8.1, lang/menu_*: Not applicable to Neovim * doc/editing.txt: Crypt related * doc/change.txt, doc/insert.txt, doc/various.txt: Removal of ex_extra tags, which already happened in Neovim * doc/vim-ja.UTF-8.1, doc/xxd-ja.UTF-8.1
Diffstat (limited to 'runtime/autoload/sqlcomplete.vim')
-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 4a8863e15f..e80729add4 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 = ""