Guard against empty command string

This commit is contained in:
Chris Toomey 2012-11-27 22:29:40 -05:00
parent 29a904e676
commit 4d59059612

View File

@ -254,6 +254,12 @@ function! s:SendCommandToRunner()
if !exists("s:user_command") if !exists("s:user_command")
let s:user_command = s:HighlightedPrompt(g:VtrPrompt) let s:user_command = s:HighlightedPrompt(g:VtrPrompt)
endif 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() call s:EnsureRunnerPane()
if g:VtrClearBeforeSend if g:VtrClearBeforeSend
call s:SendClearSequence() call s:SendClearSequence()