Skip to content

fix: prevent NvimTree to be alternate buffer when tab open#3205

Merged
alex-courtis merged 3 commits intomasterfrom
tab-open-alt
Oct 7, 2025
Merged

fix: prevent NvimTree to be alternate buffer when tab open#3205
alex-courtis merged 3 commits intomasterfrom
tab-open-alt

Conversation

@phanen
Copy link
Copy Markdown
Collaborator

@phanen phanen commented Oct 6, 2025

<c-t> on file, then sometimes I press <c-^> and mistakenly goto NvimTree buffer.

@alex-courtis
Copy link
Copy Markdown
Member

Tested OK for base below and a few variants:

  1. :NvimTreeOpen
  2. <navigate to file>
  3. <C-t>
  4. <C-^> or :e# or :b#
:ls!
  1  a   "[No Name]"                    line 1
  2u a-  "NvimTree_1"                   line 0
  3 %a   ".clang-format"                line 1

No # on nvim tree buffer ✔️

Copy link
Copy Markdown
Member

@alex-courtis alex-courtis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks for your contribution!

Looks good, works well, just a few questions.

Comment thread lua/nvim-tree/actions/node/open-file.lua Outdated
Comment thread lua/nvim-tree/actions/node/open-file.lua
Co-authored-by: Alexander Courtis <alex@courtis.org>
Copy link
Copy Markdown
Member

@alex-courtis alex-courtis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really appreciate all your work @phanen

@alex-courtis alex-courtis merged commit e397756 into master Oct 7, 2025
4 checks passed
@alex-courtis alex-courtis deleted the tab-open-alt branch October 7, 2025 23:57
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.

2 participants