From ac4e7e2925038e56adc6e702c5df1bcd06c842b3 Mon Sep 17 00:00:00 2001 From: Felipe Heidrich Date: Tue, 26 May 2009 17:50:41 +0000 Subject: Bug 277631: Cannot move cursor after cancelling IME input by pressing escape key. --- .../Eclipse SWT/cocoa/org/eclipse/swt/widgets/IME.java | 7 +++++++ 1 file changed, 7 insertions(+) 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; } -- cgit