From a9af9cabb455b3dd0957f7d5a4402a5027ce1c51 Mon Sep 17 00:00:00 2001 From: Asmageddon Date: Sat, 26 May 2012 22:55:38 +0200 Subject: [PATCH] Remove '(end/start reached)' message after changing search string --- deluge/ui/console/modes/alltorrents.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/deluge/ui/console/modes/alltorrents.py b/deluge/ui/console/modes/alltorrents.py index 4f7f46470..0113acdd5 100644 --- a/deluge/ui/console/modes/alltorrents.py +++ b/deluge/ui/console/modes/alltorrents.py @@ -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: