diff --git a/autoload/sw.vim b/autoload/sw.vim index 45811d674ab79bc2d12aef231a4fd3a9483db208..d711e0208732719ee65f8b29d8291a1deda2b639 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 7ed11e67d96d4ae87171c1dc8fc770c95b7a2c44..89f36fe09e288f7943e2a8f93825638b88d28055 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 d48d3da852a61f8500739b3f26a9e1662fd1487a..00e76c103c6bc640742e4aac225be3741815c4fb 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 = ''