mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-53596 Soft wrap for editors
Removed unnecessary processing on document change if soft wraps are switched off
This commit is contained in:
@@ -384,6 +384,9 @@ public class SoftWrapModelImpl implements SoftWrapModelEx, DocumentListener {
|
||||
|
||||
@Override
|
||||
public void beforeDocumentChange(DocumentEvent event) {
|
||||
if (!isSoftWrappingEnabled()) {
|
||||
return;
|
||||
}
|
||||
for (DocumentListener listener : myDocumentListeners) {
|
||||
listener.beforeDocumentChange(event);
|
||||
}
|
||||
@@ -391,6 +394,9 @@ public class SoftWrapModelImpl implements SoftWrapModelEx, DocumentListener {
|
||||
|
||||
@Override
|
||||
public void documentChanged(DocumentEvent event) {
|
||||
if (!isSoftWrappingEnabled()) {
|
||||
return;
|
||||
}
|
||||
for (DocumentListener listener : myDocumentListeners) {
|
||||
listener.documentChanged(event);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user