Skip to content

Commit

Permalink
Only try to clear the pane if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
tscolari committed Aug 20, 2024
1 parent fe963f9 commit 3f6ee1a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugin/vimux.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3f6ee1a

Please sign in to comment.