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(source_selector): fix bug with tabs_layout #852

Merged
merged 4 commits into from
Apr 17, 2023

Conversation

nhat-vo
Copy link
Collaborator

@nhat-vo nhat-vo commented Apr 8, 2023

Fixes #848.

The function text_layout doesn't work with the whole tab representation, which relies on vim.fn.strdisplaywidth. It seems that this function considers the tab representation string literally, and gives a length of more than 400 for just 3 tabs. The text_layout then truncates the tab representation, which results in weird values.

To fix this, I moved the text_layout logic to truncate tab.text instead.

@nhat-vo
Copy link
Collaborator Author

nhat-vo commented Apr 14, 2023

Actually I realized that I made the wrong implementation but haven't got time to redo it, so this shouldn't be merged yet.😓

@nhat-vo nhat-vo changed the title fix(source_selector): fix bug with tabs_layout fix(source_selector): fix bug with tabs_layout (WIP) Apr 14, 2023
@cseickel
Copy link
Contributor

Actually I realized that I made the wrong implementation but haven't got time to redo it, so this shouldn't be merged yet.

Can you mark this as a "draft" PR to make it clearer that it's not ready?

@nhat-vo nhat-vo marked this pull request as draft April 17, 2023 06:52
@nhat-vo nhat-vo marked this pull request as ready for review April 17, 2023 07:56
@nhat-vo nhat-vo requested a review from cseickel April 17, 2023 07:57
@nhat-vo nhat-vo changed the title fix(source_selector): fix bug with tabs_layout (WIP) fix(source_selector): fix bug with tabs_layout Apr 17, 2023
@nhat-vo
Copy link
Collaborator Author

nhat-vo commented Apr 17, 2023

@cseickel This should be ready for review.

@cseickel cseickel merged commit 7a6b0d4 into nvim-neo-tree:main Apr 17, 2023
2 checks passed
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.

None yet

2 participants