skywind3000/asyncrun.vim

The focus is changed to a wrong tab page

JS-Zheng opened this issue · 0 comments

Vim version: 8.2.4700
asyncrun.vim version: 9f8e500

The focus will be changed to a wrong tab page when using the following option combination :

{'mode': 'terminal', 'pos': 'tab', 'focus': 0, 'reuse': 1}

IMHO, this bug is due to reuse option will not open a new tab;
therefore, it should jump to the last accessed tab page rather than the relative left/right tab of the terminal tab:

if focus == 0
exec has('nvim')? 'stopinsert' : ''
if pos ==# 'TAB'
exec 'tabnext'
else
exec 'tabprevious'
endif
endif