Skip to content

Commit

Permalink
Only try to clear the pane if it exists (#231)
Browse files Browse the repository at this point in the history
  • Loading branch information
tscolari authored Aug 21, 2024
1 parent c4ffa0b commit b110cd9
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 b110cd9

Please sign in to comment.