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 Hyperlink Details Grid Bug #136

Merged
merged 1 commit into from
Aug 13, 2023

Conversation

gierens
Copy link
Member

@gierens gierens commented Aug 13, 2023

The hyperlink option adds an escape sequence (https://github.com/eza-community/eza/blob/main/src/output/file_name.rs#L325-L329) which in the normal TextCell creation also becomes part of the length calculation. This patch applies the same logic the normal grid already did (https://github.com/eza-community/eza/blob/main/src/output/grid.rs#L45-L58), by using the filenames bare width when a hyperlink is embedded. It also respects the ShowIcons option just like the normal grid view.

Resolves #129

…ptions

The hyperlink option adds an escape sequence which in the normal TextCell
creation also becomes part of the length calculation. This patch applies
the same logic the normal grid already did, by using the filenames bare
width when a hyperlink is embedded. It also respects the ShowIcons
option just like the normal grid view.

Resolves eza-community#129
Copy link
Member

@cafkafk cafkafk left a comment

Choose a reason for hiding this comment

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

That bug didn't get to live long, nice work!
2023-08-13_19-51

I think the code makes sense to me, the behavior seems correct, and tests pass so 👍

@cafkafk cafkafk merged commit 4a08bda into eza-community:main Aug 13, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

--hyperlinks seem to break -l --grid
2 participants