Skip to content

Commit 784b283

Browse files
committed
Preference to allow up-arrow
1 parent 29d46f6 commit 784b283

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

plugin/vimux.vim

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ let g:VimuxTmuxCommand = get(g:, 'VimuxTmuxCommand', 'tmux')
1616
let g:VimuxUseNearest = get(g:, 'VimuxUseNearest', v:true)
1717
let g:VimuxExpandCommand = get(g:, 'VimuxExpandCommand', v:false)
1818
let g:VimuxCloseOnExit = get(g:, 'VimuxCloseOnExit', v:false)
19+
let g:VimuxCommandShell = get(g:, 'VimuxCommandShell', v:true)
1920

2021
function! VimuxOption(name) abort
2122
return get(b:, a:name, get(g:, a:name))
@@ -175,7 +176,12 @@ endfunction
175176

176177
function! VimuxPromptCommand(...)
177178
let command = a:0 ==# 1 ? a:1 : ''
178-
let l:command = input(VimuxOption('VimuxPromptString'), command, 'shellcmd')
179+
if VimuxOption('VimuxCommandShell')
180+
let l:cancelreturn = 'shellcmd'
181+
else
182+
let l:cancelreturn = v:false
183+
endif
184+
let l:command = input(VimuxOption('VimuxPromptString'), command, l:cancelreturn)
179185
if VimuxOption('VimuxExpandCommand')
180186
let l:command = join(map(split(l:command, ' '), 'expand(v:val)'), ' ')
181187
endif

0 commit comments

Comments
 (0)