From 784b2834c70f2c8c5759a78db7b875cac39c2126 Mon Sep 17 00:00:00 2001 From: jaspertandy Date: Wed, 10 Mar 2021 14:11:59 +0000 Subject: [PATCH] Preference to allow up-arrow --- plugin/vimux.vim | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugin/vimux.vim b/plugin/vimux.vim index 23c94f3..c6cd9c9 100644 --- a/plugin/vimux.vim +++ b/plugin/vimux.vim @@ -16,6 +16,7 @@ let g:VimuxTmuxCommand = get(g:, 'VimuxTmuxCommand', 'tmux') let g:VimuxUseNearest = get(g:, 'VimuxUseNearest', v:true) let g:VimuxExpandCommand = get(g:, 'VimuxExpandCommand', v:false) let g:VimuxCloseOnExit = get(g:, 'VimuxCloseOnExit', v:false) +let g:VimuxCommandShell = get(g:, 'VimuxCommandShell', v:true) function! VimuxOption(name) abort return get(b:, a:name, get(g:, a:name)) @@ -175,7 +176,12 @@ endfunction function! VimuxPromptCommand(...) let command = a:0 ==# 1 ? a:1 : '' - let l:command = input(VimuxOption('VimuxPromptString'), command, 'shellcmd') + if VimuxOption('VimuxCommandShell') + let l:cancelreturn = 'shellcmd' + else + let l:cancelreturn = v:false + endif + let l:command = input(VimuxOption('VimuxPromptString'), command, l:cancelreturn) if VimuxOption('VimuxExpandCommand') let l:command = join(map(split(l:command, ' '), 'expand(v:val)'), ' ') endif