Skip to content

feat(#2544): add API for querying win ID, api.tree.winid() #2545

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

Merged
merged 5 commits into from
Nov 21, 2023

Conversation

j-hui
Copy link
Contributor

@j-hui j-hui commented Nov 20, 2023

Closes #2544

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

Looking great! One failure with 0 tabpage.

Testing:

no tabpage:

  • startup - nil
  • tree open - valid
  • tree closed - nil
  • create tab 2 - nil
  • tab 2 tree open - valid
  • tab 1 tree open - valid
  • tab 2 tree closed - nil

tabpage 1 provided:

  • startup - nil
  • tree open - valid
  • tree closed - nil
  • create tab 2 - nil
  • tab 2 tree open - nil
  • tab 1 tree open from tab 2 - valid
  • tab 2 tree closed - valid
  • tab 2 and tab 1 tree closed - nil

tabpage 0 provided:

  • always nil

j-hui and others added 3 commits November 20, 2023 20:47
Co-authored-by: Alexander Courtis <alex@courtis.org>
Co-authored-by: Alexander Courtis <alex@courtis.org>
@j-hui j-hui requested a review from alex-courtis November 21, 2023 01:53
@j-hui
Copy link
Contributor Author

j-hui commented Nov 21, 2023

Thanks for your quick and detailed feedback! I just pushed a change to address that issue you found when tabpage is 0.

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

Works nicely for 0 and nil; many thanks for your contribution!

@alex-courtis alex-courtis merged commit 8c53482 into nvim-tree:master Nov 21, 2023
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.

api.tree.winid()
2 participants