Skip to content

Commit aeae2e9

Browse files
committed
Only try to clear the pane if it exists
1 parent c4ffa0b commit aeae2e9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugin/vimux.vim

+2-2
Original file line numberDiff line numberDiff line change
@@ -167,13 +167,13 @@ function! VimuxInterruptRunner() abort
167167
endfunction
168168

169169
function! VimuxClearTerminalScreen() abort
170-
if exists('g:VimuxRunnerIndex')
170+
if exists('g:VimuxRunnerIndex') && s:hasRunner(g:VimuxRunnerIndex) !=# -1
171171
call VimuxSendKeys('C-l')
172172
endif
173173
endfunction
174174

175175
function! VimuxClearRunnerHistory() abort
176-
if exists('g:VimuxRunnerIndex')
176+
if exists('g:VimuxRunnerIndex') && s:hasRunner(g:VimuxRunnerIndex) !=# -1
177177
call VimuxTmux('clear-history -t '.g:VimuxRunnerIndex)
178178
endif
179179
endfunction

0 commit comments

Comments
 (0)