Skip to content

Commit

Permalink
Prefix 'q ' to reset sequence for older versions
Browse files Browse the repository at this point in the history
  • Loading branch information
mvanderkamp committed Sep 2, 2024
1 parent 49eaa8d commit b002925
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions plugin/vimux.vim
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,20 @@ function! VimuxRunCommand(command, ...) abort
if exists('a:1')
let l:autoreturn = a:1
endif
let resetSequence = VimuxOption('VimuxResetSequence')
let l:resetSequence = VimuxOption('VimuxResetSequence')
let g:VimuxLastCommand = a:command
call VimuxTmux('copy-mode -q -t '.g:VimuxRunnerIndex)
call VimuxSendKeys(resetSequence)

try
call VimuxTmux('copy-mode -q -t '.g:VimuxRunnerIndex)
catch
let l:versionString = s:tmuxProperty('#{version}')
if str2float(l:versionString) < 3.2
let l:resetSequence = 'q '.l:resetSequence
else
endif
endtry
call VimuxSendKeys(l:resetSequence)

call VimuxSendText(a:command)
if l:autoreturn ==# 1
call VimuxSendKeys('Enter')
Expand Down

0 comments on commit b002925

Please sign in to comment.