From d21337e01a1a1e2fd90a2ccd58144995a44318ff Mon Sep 17 00:00:00 2001 From: Melissa Xie Date: Wed, 3 Sep 2014 12:20:45 -0400 Subject: [PATCH] Check for a predefined command for prompt before executing VimuxPromptCommand was accepting 1 or more arguments instead of 0 or more. Vim will complain about this despite nargs being set. --- plugin/vimux.vim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugin/vimux.vim b/plugin/vimux.vim index 566a8f4..8c60be4 100644 --- a/plugin/vimux.vim +++ b/plugin/vimux.vim @@ -131,8 +131,9 @@ function! VimuxClearRunnerHistory() endif endfunction -function! VimuxPromptCommand(command, ...) - let l:command = input(_VimuxOption("g:VimuxPromptString", "Command? "),a:command) +function! VimuxPromptCommand(...) + let command = a:0 == 1 ? a:1 : "" + let l:command = input(_VimuxOption("g:VimuxPromptString", "Command? "), command) call VimuxRunCommand(l:command) endfunction