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

Unified Diff: src/IBusChewingEngine.gob

Issue 2813016: Fix use of up and down arrows when the candidate window is not visible. (Closed) Base URL: ssh://gitrw.chromium.org/ibus-chewing.git
Patch Set: Code Review Created 10 years, 6 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 339ca3eca46ac25b2a660a5e942d05068faaf537..0fe13accbc30a008963a1f574db1edabc68bf9d1 100644
--- a/src/IBusChewingEngine.gob
+++ b/src/IBusChewingEngine.gob
@@ -941,21 +941,29 @@ class IBus:Chewing:Engine from IBus:Engine{
override (IBus:Engine) void
cursor_up(IBus:Engine *engine){
Self *self=SELF(engine);
- //chewing_handle_Up(self->context);
- self_cursor_prev(self);
- self_update(self);
- ibus_lookup_table_set_cursor_pos(self->table, self->tableCursor);
- ibus_engine_update_lookup_table(IBUS_ENGINE(self),self->table,TRUE);
+ if (self->tableVisible){
+ self_cursor_prev(self);
+ self_update(self);
+ ibus_lookup_table_set_cursor_pos(self->table, self->tableCursor);
+ ibus_engine_update_lookup_table(IBUS_ENGINE(self),self->table,TRUE);
+ } else {
+ chewing_handle_Up(self->context);
+ self_update(self);
+ }
}
override (IBus:Engine) void
cursor_down(IBus:Engine *engine){
Self *self=SELF(engine);
- //chewing_handle_Down(self->context);
- self_cursor_next(self);
- self_update(self);
- ibus_lookup_table_set_cursor_pos(self->table, self->tableCursor);
- ibus_engine_update_lookup_table(IBUS_ENGINE(self),self->table,TRUE);
+ if (self->tableVisible){
+ self_cursor_next(self);
+ self_update(self);
+ ibus_lookup_table_set_cursor_pos(self->table, self->tableCursor);
+ ibus_engine_update_lookup_table(IBUS_ENGINE(self),self->table,TRUE);
+ } else {
+ chewing_handle_Down(self->context);
+ self_update(self);
+ }
}
override (IBus:Engine) void
« 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