From e24be2971a5e829a757179c1d5d40eb48f6fe747 Mon Sep 17 00:00:00 2001 From: Cosmin Popescu Date: Wed, 28 Oct 2015 21:31:02 +0100 Subject: [PATCH] version 4.0.2 --- autoload/sw.vim | 4 ++++ resources/shortcuts_sql_buffer_statement.vim | 1 - resources/sqlwbserver | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/autoload/sw.vim b/autoload/sw.vim index 45811d6..d711e02 100644 --- a/autoload/sw.vim +++ b/autoload/sw.vim @@ -152,6 +152,10 @@ endfunction " Executes an sql command{{{1 function! sw#execute_sql(command, wait_result) + if (!exists('b:port')) + call sw#display_error("This buffer is not an sql workbench buffer.") + return + endif let g:sw_last_sql_query = a:command if (exists('w:auto_added1') && exists('w:auto_added2')) let s1 = substitute(w:auto_added1, "\n", '', 'g') diff --git a/resources/shortcuts_sql_buffer_statement.vim b/resources/shortcuts_sql_buffer_statement.vim index 7ed11e6..89f36fe 100644 --- a/resources/shortcuts_sql_buffer_statement.vim +++ b/resources/shortcuts_sql_buffer_statement.vim @@ -4,7 +4,6 @@ nmap :SWSqlExecuteAll! vmap :SWSqlExecuteSelected! nmap :SWSqlExecuteCurrent! -nmap :SWSqlObjectInfo nmap os :SWSqlObjectSource nmap b:SWSqlToggleMessagest nmap :SWKillCurrentCommand diff --git a/resources/sqlwbserver b/resources/sqlwbserver index d48d3da..00e76c1 100755 --- a/resources/sqlwbserver +++ b/resources/sqlwbserver @@ -34,7 +34,7 @@ class SQLWorkbench(object): lock = thread.allocate_lock() executing = thread.allocate_lock() new_loop = thread.allocate_lock() - prompt_pattern_begin = '^[a-zA-Z_0-9\\.]+(\\@[a-zA-Z_0-9/]+)?\\>[ \s\t]*' + prompt_pattern_begin = '^[a-zA-Z_0-9\\.]+(\\@[a-zA-Z_0-9/\-]+)?\\>[ \s\t]*' prompt_pattern = prompt_pattern_begin + '$' resultset_end_pattern = 'send_to_vim set to' buff = '' -- GitLab