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

refactor(tabs): tab is modified if any child buffer is modified #554

Merged
merged 2 commits into from
Sep 18, 2022

Conversation

rwblokzijl
Copy link
Contributor

If a buffer is modified within a tab, the tab is only marked as modified if that buffer is in focus. This PR marks the tab as modified if any of the buffers in the tab are modified.

@rwblokzijl rwblokzijl changed the title Mark tabs as modified if any containing buffer is modified. Mark tabs as modified if any contained buffer is modified. Sep 16, 2022
lua/bufferline/models.lua Outdated Show resolved Hide resolved
Copy link
Owner

@akinsho akinsho left a comment

Choose a reason for hiding this comment

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

This LGTM other than one comment I left. It's worth noting that whilst this seems fine to me, I can't predict whether some other tabs user will turn around and complain that they prefer the alternate way of working 🤷🏿‍♂️. Might call on you to defend this but definitely would rather only one mechanism here and this seems sensible

@rwblokzijl
Copy link
Contributor Author

rwblokzijl commented Sep 17, 2022

Sounds good. I cannot personally think of a workflow where this feature would be unwanted, but if one comes along I'll be happy to join the discussion.

Copy link
Owner

@akinsho akinsho left a comment

Choose a reason for hiding this comment

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

LGTM 🚀 thanks for tweaking it 👍🏿

@akinsho akinsho changed the title Mark tabs as modified if any contained buffer is modified. refactor(tabs): tab is modified if any child buffer is modified Sep 18, 2022
@akinsho akinsho merged commit 9550cfa into akinsho:dev Sep 18, 2022
@akinsho akinsho added the feature A new feature PR label Sep 19, 2022
akinsho added a commit that referenced this pull request Sep 19, 2022
*chore(autoload): tweak comments(#552)

* refactor(tabs): tab is modified if any child buffer is modified (#554)

* feat(duplicates): toggle unique buffer name (#469) (#556)

* refactor(tabs): diagnostics are the sum of buffer diagnostics (#558)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new feature PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants