Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix CommandTOpen (GotoOrOpen) command #315

Closed
wants to merge 2 commits into from
Closed

Conversation

tap349
Copy link
Contributor

@tap349 tap349 commented Nov 11, 2017

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:

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

@tap349 tap349 changed the title fix GotoOrOpen command fix CommandTOpen (GotoOrOpen) command Nov 11, 2017
@wincent
Copy link
Owner

wincent commented Nov 17, 2017

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

@wincent wincent closed this in 7147ba9 Nov 17, 2017
ZyX-I pushed a commit to powerline/deps that referenced this pull request Nov 21, 2017
vim-plugins/command-t tip:

    commit 7147ba92c9c1eef8269fd47d47ba636ce7f365a6
    Author: Greg Hurrell <greg@hurrell.net>
    Date:   Thu Nov 16 19:46:11 2017 -0800

        Merge branch 'pull/315'

        Closes: wincent/command-t#315

        * pull/315:
          doc: update AUTHORS and HISTORY
          Fix GotoOrOpen command
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

<C-t> opens a horizontal split instead of a new tab
2 participants