Ensure valid runner pane setting before killing

Closes #44 - Prevent killing vim pane
This commit is contained in:
Chris Toomey 2015-01-27 15:35:44 -05:00
parent 745a54b0a7
commit d6a0abcb26

View File

@ -70,9 +70,7 @@ function! s:RequireLocalPaneOrDetached()
endfunction endfunction
function! s:KillLocalRunner() function! s:KillLocalRunner()
if s:runner_pane == s:ActivePaneIndex() if s:ValidRunnerPaneSet()
call s:EchoError("RunnerPane is set to current pane. Cancelling")
else
let targeted_cmd = s:TargetedTmuxCommand("kill-pane", s:runner_pane) let targeted_cmd = s:TargetedTmuxCommand("kill-pane", s:runner_pane)
call s:SendTmuxCommand(targeted_cmd) call s:SendTmuxCommand(targeted_cmd)
unlet s:runner_pane unlet s:runner_pane