attach pane when there is none instead of error

This commit is contained in:
navid.sassan 2020-08-14 15:21:01 +02:00
parent 1e8b1d5f7c
commit 9d91062d79

View File

@ -43,8 +43,7 @@ endfunction
function! s:ValidRunnerPaneSet() function! s:ValidRunnerPaneSet()
if !exists("s:runner_pane") if !exists("s:runner_pane")
call s:EchoError("No runner pane attached.") call s:AttachToPane()
return 0
endif endif
if !s:ValidRunnerPaneNumber(s:runner_pane) if !s:ValidRunnerPaneNumber(s:runner_pane)
call s:EchoError("Runner pane setting (" . s:runner_pane . ") is invalid. Please reattach.") call s:EchoError("Runner pane setting (" . s:runner_pane . ") is invalid. Please reattach.")