-
-
Notifications
You must be signed in to change notification settings - Fork 79
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
Hide decorations for selections that are larger than the viewport #403
Conversation
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.
Not sure I love the idea of having no visual feedback. Maybe we could just make the color less dramatic?
You still get the visual feedback of the window actually scrolling. I think that decorating the entire viewport gives us no extra information. The point of the decoration is for the user to get a feedback on which part of the text was actually affected/referenced. This is useful because you might not always know the bounds of a statement. If we just highlight the entire viewport you have no information about the exact range of the selection/reference and I then would argue that flashing the entire viewport is just irritating and gives the user no relevant feedback. |
That's fair. I'll pull it to get a feel for it |
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 tested this one locally but it doesn't work. I said "crown file", and it still highlighted everything
It only excludes selections that are larger than the viewport. The reason for this is that if you have a small file that maybe only contains a single function it still might be a good idea to be able to highlight the entire document. You need to have a file with more rows than you can fit in the viewport/editor for this fix to take effect. |
I tested it on a file that had more rows than fit in my viewport, and it still highlighted it |
Where you scrolled down? If your selection are matching the start or the end of the viewport it will still show. I could probably be a little more specific about the requirements |
But you check if the start matches after you've already scrolled, so you will always be at the start. I'm surprised it works for you |
Worked for me but I only tested with center probably. I will have another look at it tomorrow. |
Have another look at it now |
Just work around so that
crown file
don't flash entire screen. Large functions that cover most of the viewport will have a similar effect but now at least we can get rid of those cases when the entire viewport would flash.