-
-
Notifications
You must be signed in to change notification settings - Fork 612
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
Add text hard wrapping #891
base: main
Are you sure you want to change the base?
Conversation
// If enable hard wrap max width is enabled, then disabled=false | ||
// otherwise, disabled=true | ||
$input.attr('disabled', !this.checked); | ||
common.setAttribute(['codemirror', hardWrapMaxWidthEnabledKey], this.checked); |
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.
Made it so that when this feature is disabled, the input to change the width for wrapping is also disabled, and vice versa.
Hi, I finally got around to reviewing and testing this in more depth. I made some changes in the process. I added some comments (via GitHub's UI, not in the code) which explain my reasoning. This PR does exactly what it's supposed to do when editing alone, however, I found that it introduces some problematic behaviour in collaborative editing sessions. The The consequence of this is that if one person joins an editing session with hard-wrapping enabled their client will wrap lines according to their preferences any time anybody makes a change, which could be very disruptive. Another way to approach this is to allow users to set their preferred wrapping width in settings and to apply that to documents that they create, but to provide an additional setting for individual documents that
We do this to some degree for the author colors functionality. |
Hi, sorry, got wrapped up with other things. Thanks for the feedback! |
Worked on this issue - #521
/code
and/markdown
.Test Cases
/code
/markdown
actually works without wrapping./code
/markdown
actually works with wrapping./code
and/markdown