Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Override CandidateSelector#set_index() to restore the last cursor pos.

  • Loading branch information...
commit 962f45d96b2d7a137ea3ac71c438fb52f201522f 1 parent cb894f2
Daiki Ueno authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 engine/
8 engine/
@@ -99,9 +99,15 @@ def candidate(self):
return (output, annotation, False)
return candidate
+ def set_index(self, index):
+ super(CandidateSelector, self).set_index(index)
+ if self.index() >= self.pagination_start:
+ self.__lookup_table.set_cursor_pos(self.index() -
+ self.pagination_start)
def key_to_index(self, key):
if key not in self.__keys:
- raise IndexError('%s is not a key' % key)
+ raise IndexError('%s is not a valid key' % key)
pos = self.__keys.index(key)
if self.__lookup_table.set_cursor_pos_in_current_page(pos):
index = self.__lookup_table.get_cursor_pos()
Please sign in to comment.
Something went wrong with that request. Please try again.