-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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: Add soft wrap for ghost text #5540
Conversation
This looks a nice change! Do you see a nice way to communicate to users in the ghost text which line breaks are due to the soft-wrapping and which line breaks are actual line breaks in the suggestion? |
Given that it's not possible to scroll the editor while ghost text is shown, I think horizontal overflowing beyond the viewport is annoying and it would be a better user experience to ghost the ghost text soft-wrapped, regardless of whether the user has soft-wrap enabled for the rest of their code or not. |
I think I could make it work either by tweaking the CSS or by adding a wrapping symbol at the end of the wrapped lines. I'll test something and push the changes in time. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5540 +/- ##
==========================================
+ Coverage 86.64% 86.65% +0.01%
==========================================
Files 593 593
Lines 42839 42873 +34
Branches 7120 7123 +3
==========================================
+ Hits 37117 37151 +34
Misses 5722 5722
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@akoreman, this should make it, I think screen-capture.60.webm |
Looks good to me, thanks for this contribution 🚀 |
Issue #, if available: #5513
Description of changes:
The current implementation wraps all long text based on the screen width. I am considering whether it makes sense to adhere to the user's wrap settings in this case. In my opinion, it would be beneficial to display and wrap the entire line of ghost text, but this point is open for discussion.
screen-capture.58.webm
(Test completion includes sentences with newlines)
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Pull Request Checklist:
ace.d.ts
) and its references: