summaryrefslogtreecommitdiffstats
path: root/src/ZYEditor.cc
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2019-04-25 13:59:45 +0800
committerPeng Wu <alexepico@gmail.com>2019-04-25 13:59:45 +0800
commit1ec2814cd1df22e742261ed252d6e4f5a645a76f (patch)
tree0cdd4abd012c77f23c0cafb45c2334720bc1204e /src/ZYEditor.cc
parenta9f5f78914d41ad3fecd6ca9d5396c65d2d15a71 (diff)
downloadibus-libzhuyin-1ec2814cd1df22e742261ed252d6e4f5a645a76f.tar.gz
ibus-libzhuyin-1ec2814cd1df22e742261ed252d6e4f5a645a76f.tar.xz
ibus-libzhuyin-1ec2814cd1df22e742261ed252d6e4f5a645a76f.zip
fixes escape handling
Diffstat (limited to 'src/ZYEditor.cc')
-rw-r--r--src/ZYEditor.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ZYEditor.cc b/src/ZYEditor.cc
index 5143c4c..08bb2ac 100644
--- a/src/ZYEditor.cc
+++ b/src/ZYEditor.cc
@@ -98,6 +98,9 @@ Editor::processKeyEvent (guint keyval, guint keycode, guint modifiers)
}
return TRUE;
case IBUS_Escape:
+ if (m_text.empty ())
+ return FALSE;
+
reset ();
return TRUE;
default: