10000 Clip cursor width when soft-wrap is on and cursor is at the end of a line by as-cii · Pull Request #16943 · atom/atom · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Clip cursor width when soft-wrap is on and cursor is at the end of a line #16943

8000 Merged
merged 1 commit into from
Mar 20, 2018

Conversation

as-cii
Copy link
Contributor
@as-cii as-cii commented Mar 13, 2018

Description of the Change

This pull request prevents the parent tile from disabling sub-pixel anti-aliasing by clipping the cursor width to be fully contained within the editor when soft-wrap is on and the cursor is at the end of a line. For some reason, adding overflow: hidden to the cursor container element doesn't solve the issue, so we're adding this workaround instead.

Alternate Designs

Unclear.

Verification Process

  • Enable soft-wrap
  • Keep writing until reaching the end of the line (without wrapping to the next line)
  • Notice how sub pixel anti-aliasing doesn't break anymore
Before After
before after

Applicable Issues

Fixes #16889

/cc: @Ben3eeE @50Wliu can you confirm this pull request fixes it? Thanks! 🙇

This prevents the parent tile from disabling sub-pixel anti-aliasing.
For some reason, adding `overflow: hidden` to the cursor container
element doesn't solve the issue, so we're adding this workaround
instead.
@Ben3eeE
Copy link
Contributor
Ben3eeE commented Mar 13, 2018

@as-cii I can still reproduce this issue when the cursor is on the very edge of the window.

Before: 8000
Subpixel AA is lost when the cursor is near the edge of the window
subpixel aa loss softwrap before

After:
I can move the cursor to this position but when adding another a subpixel AA is lost
subpixel aa loss softwrap after

@Ben3eeE
Copy link
Contributor
Ben3eeE commented Mar 13, 2018

Possibly unrelated but I also noticed that changing tabs when the cursor is in this position causes the editor to scroll horizontally:

scrolled with soft wrap

@as-cii
Copy link
Contributor Author
as-cii commented Mar 20, 2018

@Ben3eeE thanks for the feedback! 💯 We should pair on this sometime, as I can't reproduce the problem anymore on my machine unfortunately.

@Ben3eeE
Copy link
Contributor
Ben3eeE commented Mar 20, 2018

@as-cii What do you think about merging this for now but not closing the issue? This PR does make it a lot better and the issue I mentioned in #16943 (comment) can be reproduced on master so it's unrelated to this PR.

I'm up for pairing to fix these two issues.

@as-cii
Copy link
Contributor Author
as-cii commented Mar 20, 2018

Sounds good, thanks for the feedback @Ben3eeE! Can you open a separate issue describing the problem?

@as-cii as-cii merged commit d5c74c7 into master Mar 20, 2018
@as-cii as-cii deleted the as-fix-subpixel-aa-when-soft-wrap-is-on branch March 20, 2018 09:01
@Ben3eeE
Copy link
Contributor
Ben3eeE commented Mar 20, 2018

✅ Opened #16996
✅ Reopened #16889 and moved it to the backlog

@jasonrudolph jasonrudolph mentioned this pull request May 8, 2018
60 tasks
@daviwil daviwil mentioned this pull request Dec 20, 2018
59 tasks
@as-cii as-cii mentioned this pull request May 20, 2019
8 tasks
@rafeca rafeca mentioned this pull request Jun 25, 2019
7 tasks
@lkashef lkashef mentioned this pull request May 20, 2020
@lkashef lkashef mentioned this pull request Jul 16, 2020
76 tasks
@sadick254 sadick254 mentioned this pull request Dec 1, 2020
58 tasks
@sadick254 sadick254 mentioned this pull request Aug 19, 2021
64 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Loss of subpixel AA on soft-wrapped line
2 participants
0