Fix highlighting in picker with multiple columns - #6333
Merged
Conversation
the-mikedavis
requested changes
Mar 18, 2023
the-mikedavis
left a comment
Member
There was a problem hiding this comment.
Adding to cell_start_byte_offset in the None branch is a nice catch and that should stay 👍. The other change is not the right fix though. The offset is caused by Row::cell_text appending newlines to each cell's text and that should be fixed directly instead. It's caused by a bug introduced in b2837ff in impl<'a> From<&Text<'a>> for String where each line gets a newline appended. That newline should only be added between lines though. There's a small refactor of that for that fixes the issue:
for spans in &text.lines {
if !output.is_empty() {
output.push('\n');
}
for span in &spans.0 {
output.push_str(&span.content);
}
}
Contributor
Author
|
Thanks, I didn't know if that was intentional or not. Fixed. |
the-mikedavis
approved these changes
Mar 18, 2023
sagnibak
pushed a commit
to sagnibak/helix
that referenced
this pull request
Mar 21, 2023
icecreammatt
pushed a commit
to icecreammatt/helix
that referenced
this pull request
Apr 19, 2023
wes-adams
pushed a commit
to wes-adams/helix
that referenced
this pull request
Jul 4, 2023
smortime
pushed a commit
to smortime/helix
that referenced
this pull request
Jul 10, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #6254
This could be probably done in a less hacky way, but I didn't want to overcomplicate things.