This is an expected behaviour, because the line-wrap feature is actually a three-states option: "None", "After words" and "Anywhere". When the Line-Wrap is enabled using the corresponding button, ADS currently calls EditorPreferences.setLineWrapType(JEditorPane, LineWrapType.AFTER_WORDS);
. In order to wrap lines with no space breaks, you need to call EditorPreferences.setLineWrapType(JEditorPane, LineWrapType.ANYWHERE);
but this type of wrapping could seem annoying to some users.
The best would be to transform the Line-wrap button to a three-states combobox and let user choose what type of wrapping wants to use. Or you can define a new option inside Options window (per mimetype or global option) where user can choose the line-wrap type: "After words" or "Anywhere". Then the selected line-wrap type can be applied individually on each editor by toggling the Line-wrap button.
Issue #7739 |
Closed |
Completion |
No due date |
No fixed build |
No time estimate |
1 issue link |
relates to #7706
Issue #7706Editor doesnt display entire characters with Enabling and Disabling Line Wrap and using scrollbar |
This is an expected behaviour, because the line-wrap feature is actually a three-states option: "None", "After words" and "Anywhere". When the Line-Wrap is enabled using the corresponding button, ADS currently calls
EditorPreferences.setLineWrapType(JEditorPane, LineWrapType.AFTER_WORDS);
. In order to wrap lines with no space breaks, you need to callEditorPreferences.setLineWrapType(JEditorPane, LineWrapType.ANYWHERE);
but this type of wrapping could seem annoying to some users.The best would be to transform the Line-wrap button to a three-states combobox and let user choose what type of wrapping wants to use. Or you can define a new option inside Options window (per mimetype or global option) where user can choose the line-wrap type: "After words" or "Anywhere". Then the selected line-wrap type can be applied individually on each editor by toggling the Line-wrap button.