From 4d59059612548f296b9cb066f5df61056d7841d9 Mon Sep 17 00:00:00 2001 From: Chris Toomey Date: Tue, 27 Nov 2012 22:29:40 -0500 Subject: [PATCH] Guard against empty command string --- plugin/vim-tmux-runner.vim | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugin/vim-tmux-runner.vim b/plugin/vim-tmux-runner.vim index 1f9155e..9e26eb9 100644 --- a/plugin/vim-tmux-runner.vim +++ b/plugin/vim-tmux-runner.vim @@ -254,6 +254,12 @@ function! s:SendCommandToRunner() if !exists("s:user_command") let s:user_command = s:HighlightedPrompt(g:VtrPrompt) endif + let escaped_empty_string = "''" + if s:user_command == escaped_empty_string + unlet s:user_command + echohl ErrorMsg | echom "VTR: command string required" | echohl None + return + endif call s:EnsureRunnerPane() if g:VtrClearBeforeSend call s:SendClearSequence()