summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorfujiwarat <takao.fujiwara1@gmail.com>2012-10-02 15:18:00 +0900
committerfujiwarat <takao.fujiwara1@gmail.com>2012-10-02 15:18:00 +0900
commit70dc912db827c333995c09e06dda88ab076e792d (patch)
tree4fef44ecdff44d9b9381e34ce5a8a5c13e2af8e0 /engine
parent7f5a9dc9942b52381d6ab7b4f6c9009057a2c759 (diff)
downloadibus-anthy-70dc912db827c333995c09e06dda88ab076e792d.tar.gz
Fixed IBus.LookupTable->candidates->len > 0 (#860135)
Diffstat (limited to 'engine')
-rw-r--r--engine/engine.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/engine/engine.py b/engine/engine.py
index 5e7eeb6..cef6aa0 100644
--- a/engine/engine.py
+++ b/engine/engine.py
@@ -1210,7 +1210,8 @@ class Engine(IBus.EngineSimple):
if self.__convert_mode != CONV_MODE_OFF:
if self.__lookup_table_visible:
- self.__lookup_table.set_cursor_pos(0)
+ if self.__lookup_table.get_number_of_candidates() > 0:
+ self.__lookup_table.set_cursor_pos(0)
candidate = UN(self.__lookup_table.get_candidate(0).get_text())
self.__segments[self.__cursor_pos] = 0, candidate
self.__lookup_table_visible = False
@@ -2361,7 +2362,7 @@ class Engine(IBus.EngineSimple):
self.__context.set_string(text.encode ('utf-8'))
self.__lookup_table.clear()
- self.__lookup_table.show_cursor (False)
+ self.__lookup_table.set_cursor_visible(False)
self.__lookup_table_visible = False
self.update_aux_string(u'', IBus.AttrList(),
self.__lookup_table_visible)