diff options
author | Dani Megert | 2014-04-11 14:48:55 +0000 |
---|---|---|
committer | Dani Megert | 2014-04-11 15:21:09 +0000 |
commit | 0f77e7352f60dd8484b68b33ad3c150b8b079821 (patch) | |
tree | ab388c1dfbaa243e55171b8f1c4bf8e1d773083e | |
parent | bdb5c111133f9a9c29e3bf649ad967640e71356e (diff) | |
download | eclipse.platform.text-0f77e7352f60dd8484b68b33ad3c150b8b079821.tar.gz eclipse.platform.text-0f77e7352f60dd8484b68b33ad3c150b8b079821.tar.xz eclipse.platform.text-0f77e7352f60dd8484b68b33ad3c150b8b079821.zip |
Fixed bug 368354: Copy/Paste fails intermittentlyI20140415-0800
-rw-r--r-- | org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java index dd01c7a5942..cf334b0be80 100644 --- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java +++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2013 IBM Corporation and others. + * Copyright (c) 2000, 2014 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -3137,6 +3137,7 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit public void run() { // check whether editor has not been disposed yet if (fSourceViewer != null && fSourceViewer.getDocument() != null) { + handleCursorPositionChanged(); updateSelectionDependentActions(); } } @@ -3147,8 +3148,10 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit public void selectionChanged(SelectionChangedEvent event) { if (fDisplay == null) fDisplay= getSite().getShell().getDisplay(); - fDisplay.asyncExec(fRunnable); - handleCursorPositionChanged(); + if (Display.getCurrent() == fDisplay) + fRunnable.run(); + else + fDisplay.asyncExec(fRunnable); } }; } |