summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Northover <steve>2004-01-20 17:20:01 +0000
committerSteve Northover <steve>2004-01-20 17:20:01 +0000
commitbcdacd458fe7822094caa6c49744e969b163d36c (patch)
tree9b9c013bdfd435ed6d2eef64bba021c63354ebee
parentbccc589a105ee7f59092bce7c6038d31ce23d574 (diff)
downloadeclipse.platform.swt-3036b.tar.gz
eclipse.platform.swt-3036b.tar.xz
eclipse.platform.swt-3036b.zip
50256v3036b
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java
index 19b74c4791..e225d89813 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java
@@ -34,7 +34,7 @@ import org.eclipse.swt.events.*;
*/
public class Text extends Scrollable {
int tabs, oldStart, oldEnd;
- boolean doubleClick, ignoreVerify, ignoreCharacter;
+ boolean doubleClick, ignoreModify, ignoreVerify, ignoreCharacter;
/**
* The maximum number of characters that can be entered
@@ -534,12 +534,12 @@ public Point getCaretLocation () {
* from a WM_CHAR handler. The fix is to ignore calling the
* handler from WM_CHAR.
*/
- ignoreCharacter = true;
+ ignoreCharacter = ignoreModify = true;
OS.SendMessage (handle, OS.EM_REPLACESEL, 0, new TCHAR (cp, " ", true));
pos = OS.SendMessage (handle, OS.EM_POSFROMCHAR, start [0], 0);
OS.SendMessage (handle, OS.EM_SETSEL, start [0], start [0] + 1);
OS.SendMessage (handle, OS.EM_REPLACESEL, 0, new TCHAR (cp, "", true));
- ignoreCharacter = false;
+ ignoreCharacter = ignoreModify = false;
}
}
return new Point ((short) (pos & 0xFFFF), (short) (pos >> 16));
@@ -2005,7 +2005,8 @@ LRESULT WM_UNDO (int wParam, int lParam) {
LRESULT wmCommandChild (int wParam, int lParam) {
int code = wParam >> 16;
switch (code) {
- case OS.EN_CHANGE:
+ case OS.EN_CHANGE:
+ if (ignoreModify) break;
/*
* It is possible (but unlikely), that application
* code could have disposed the widget in the modify