From aeae2e9567c07dbf41854547e0f3a53b80368d14 Mon Sep 17 00:00:00 2001 From: Tiago Scolari Date: Tue, 20 Aug 2024 10:09:05 +0100 Subject: [PATCH] Only try to clear the pane if it exists --- plugin/vimux.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/vimux.vim b/plugin/vimux.vim index ca78fa5..ac950c5 100644 --- a/plugin/vimux.vim +++ b/plugin/vimux.vim @@ -167,13 +167,13 @@ function! VimuxInterruptRunner() abort endfunction function! VimuxClearTerminalScreen() abort - if exists('g:VimuxRunnerIndex') + if exists('g:VimuxRunnerIndex') && s:hasRunner(g:VimuxRunnerIndex) !=# -1 call VimuxSendKeys('C-l') endif endfunction function! VimuxClearRunnerHistory() abort - if exists('g:VimuxRunnerIndex') + if exists('g:VimuxRunnerIndex') && s:hasRunner(g:VimuxRunnerIndex) !=# -1 call VimuxTmux('clear-history -t '.g:VimuxRunnerIndex) endif endfunction