skywind3000 / asyncrun.vim

:rocket: Run Async Shell Commands in Vim 8.0 / NeoVim and Output to the Quickfix Window !!
https://www.vim.org/scripts/script.php?script_id=5431
MIT License
1.84k stars 109 forks source link

The focus is changed to a wrong tab page #248

Closed JS-Zheng closed 2 years ago

JS-Zheng commented 2 years ago

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: https://github.com/skywind3000/asyncrun.vim/blob/9f8e50033cb724d8856907a5fbf4685eb3efda24/plugin/asyncrun.vim#L1482-L1489