wincent / command-t

⌨️ Fast file navigation for Neovim and Vim
BSD 2-Clause "Simplified" License
2.74k stars 317 forks source link

fix CommandTOpen (GotoOrOpen) command #315

Closed tap349 closed 6 years ago

tap349 commented 6 years ago

PR should fix #311 and maybe #314.

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:

=> file is opened in horizontal split instead of a new tab.

Also I checked behaviour with set nohidden - everything seems to work correctly.

wincent commented 6 years ago

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...