Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/link/LinkedModeUI.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/link/LinkedModeUI.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/link/LinkedModeUI.java
index 59c7311b7..5d5b11544 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/link/LinkedModeUI.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/link/LinkedModeUI.java
@@ -401,6 +401,10 @@ public class LinkedModeUI {
return;
}
}
+
+ // Make sure that any document change is done inside a compound change
+ beginCompoundChangeIfNeeded();
+
}
/*
@@ -501,7 +505,7 @@ public class LinkedModeUI {
if (!position.equals(fPreviousPosition))
endCompoundChange();
- beginCompoundChange();
+ beginCompoundChangeIfNeeded();
}
fPreviousPosition= position;
@@ -1208,7 +1212,7 @@ public class LinkedModeUI {
}
}
- private void beginCompoundChange() {
+ private void beginCompoundChangeIfNeeded() {
if (!fHasOpenCompoundChange) {
ITextViewerExtension extension= (ITextViewerExtension) fCurrentTarget.getViewer();
IRewriteTarget target= extension.getRewriteTarget();

Back to the top