summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelipe Heidrich <fheidric>2009-05-26 17:50:41 +0000
committerFelipe Heidrich <fheidric>2009-05-26 17:50:41 +0000
commitac4e7e2925038e56adc6e702c5df1bcd06c842b3 (patch)
tree596a763a6ffe6d00d46b47b64d61998df5ba4e81
parent4639b469833e6c587d0fdc59a6b4bc4e0f22829d (diff)
downloadeclipse.platform.swt-ac4e7e2925038e56adc6e702c5df1bcd06c842b3.tar.gz
eclipse.platform.swt-ac4e7e2925038e56adc6e702c5df1bcd06c842b3.tar.xz
eclipse.platform.swt-ac4e7e2925038e56adc6e702c5df1bcd06c842b3.zip
Bug 277631: Cannot move cursor after cancelling IME input by pressing escape key.
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/IME.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/IME.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/IME.java
index 78443c87f9..aff466d1d8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/IME.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/IME.java
@@ -485,6 +485,13 @@ boolean setMarkedText_selectedRange (int /*long*/ id, int /*long*/ sel, int /*lo
event.end = end;
event.text = text = str.getString();
sendEvent (SWT.ImeComposition, event);
+ if (isDisposed ()) return false;
+ if (text.length () == 0) {
+ Shell s = parent.getShell ();
+ s.keyInputHappened = true;
+ startOffset = -1;
+ resetStyles ();
+ }
return true;
}