-
Notifications
You must be signed in to change notification settings - Fork 33
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
Display selected newlines as whitespace in the selection highlight #296
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we have any tests where there is a line with just a newline (i.e. a It's probably worth adding one. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll look at adding more selection-drawing tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously, we would always draw if there were clusters but no advance (the second condition). However, now we only do so if there was an explicit break.
I can see two scenarios which we are in:
I think the former is more likely, but I haven't looked into the history.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked over #170 but couldn't find where
cluster_count
was added. I suspect the only time a cluster will have zero advance is an explicit newline. (Maybe there are edge cases around zero-width spaces or something? I think a newline is the only time we want to display a selection rectangle.)I'll take another look later but I think you're right and the cluster-counting stuff can be removed.