Remove '(end/start reached)' message after changing search string

This commit is contained in:
Asmageddon 2012-05-26 22:55:38 +02:00
parent 546aa58482
commit a9af9cabb4
1 changed files with 6 additions and 0 deletions

View File

@ -866,9 +866,15 @@ class AllTorrents(BaseMode, component.Component):
if self.search_string and self.cursor > 0:
self.search_string = self.search_string[:self.cursor - 1] + self.search_string[self.cursor:]
self.cursor-=1
if self.search_state in [SEARCH_START_REACHED, SEARCH_END_REACHED]:
self.search_state = SEARCH_SUCCESS
elif c == curses.KEY_DC:
if self.search_string and self.cursor < len(self.search_string):
self.search_string = self.search_string[:self.cursor] + self.search_string[self.cursor+1:]
if self.search_state in [SEARCH_START_REACHED, SEARCH_END_REACHED]:
self.search_state = SEARCH_SUCCESS
if self.cursor < len(self.search_string):
self.__do_search()
elif c == curses.KEY_UP: