PR fixes GotoOrOpen command: now GotoOrOpen command uses sbuffer only if buffer is visible in current or some other tab (new BufVisible function checks that buffer exists, that it's loaded, listed and not hidden).
Steps to reproduce the bug:
set hidden in .vimrc
let g:CommandTAcceptSelectionTabCommand = 'CommandTOpen tabe'
open any file in a new tab with <C-t> from Command-T
delete its buffer with :bd
open that file in a new tab with <C-t> again
=> file is opened in horizontal split instead of a new tab.
Also I checked behaviour with set nohidden - everything seems to work correctly.
Thanks @tap349. This looks safe enough to try landing on the master branch... if it ends up breaking things for people, I'm sure we'll hear about it...
PR should fix #311 and maybe #314.
PR fixes
GotoOrOpen
command: nowGotoOrOpen
command usessbuffer
only if buffer is visible in current or some other tab (newBufVisible
function checks that buffer exists, that it's loaded, listed and not hidden).Steps to reproduce the bug:
set hidden
in .vimrclet g:CommandTAcceptSelectionTabCommand = 'CommandTOpen tabe'
<C-t>
from Command-T:bd
<C-t>
again=> file is opened in horizontal split instead of a new tab.
Also I checked behaviour with
set nohidden
- everything seems to work correctly.