From d6a0abcb266618225c1507fca965945e89604a03 Mon Sep 17 00:00:00 2001 From: Chris Toomey Date: Tue, 27 Jan 2015 15:35:44 -0500 Subject: [PATCH] Ensure valid runner pane setting before killing Closes #44 - Prevent killing vim pane --- plugin/vim-tmux-runner.vim | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/plugin/vim-tmux-runner.vim b/plugin/vim-tmux-runner.vim index e385fe6..6266b33 100644 --- a/plugin/vim-tmux-runner.vim +++ b/plugin/vim-tmux-runner.vim @@ -70,9 +70,7 @@ function! s:RequireLocalPaneOrDetached() endfunction function! s:KillLocalRunner() - if s:runner_pane == s:ActivePaneIndex() - call s:EchoError("RunnerPane is set to current pane. Cancelling") - else + if s:ValidRunnerPaneSet() let targeted_cmd = s:TargetedTmuxCommand("kill-pane", s:runner_pane) call s:SendTmuxCommand(targeted_cmd) unlet s:runner_pane