Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(278)

Unified Diff: src/IBusChewingEngine.gob

Issue 3146005: Do not commit buffer in reset function. (Closed) Base URL: http://src.chromium.org/git/ibus-chewing.git
Patch Set: clear ENGINE_STATUS_NEED_COMMIT flag Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IBusChewingEngine.gob
diff --git a/src/IBusChewingEngine.gob b/src/IBusChewingEngine.gob
index 643688a7b89d9d0abd24b5ef0f59d86fe769bf80..d8b3d6adf6bf01dc3e752c5be2bf491a99603408 100644
--- a/src/IBusChewingEngine.gob
+++ b/src/IBusChewingEngine.gob
@@ -937,10 +937,11 @@ class IBus:Chewing:Engine from IBus:Engine{
reset(IBus:Engine *engine){
G_DEBUG_MSG(1,"[I1] reset");
Self *self=SELF(engine);
- if (self->_priv->statusFlags & ENGINE_STATUS_NEED_COMMIT){
- /* Force commit non-empty preedit buffer */
- self_force_commit(self);
- }
+
+ /* Always clean buffer */
+ chewing_handle_Esc(self->context);
+ ibus_chewing_engine_clear_status_flag(self, ENGINE_STATUS_NEED_COMMIT | ENGINE_STATUS_FORCE_COMMIT );
+
ibus_lookup_table_clear(self->table);
/* Save KBType type, ChiEng, and ShapeMode becaue chewing_Reset() will reset them to default.
*/
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698