From b110cd95062f5d83a4cb58b807783d783e1fbcd8 Mon Sep 17 00:00:00 2001 From: Tiago Scolari <38940+tscolari@users.noreply.github.com> Date: Wed, 21 Aug 2024 09:44:17 +0100 Subject: [PATCH] Only try to clear the pane if it exists (#231) --- 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