From 1707940be0d5892eccc2a1e2c22ec7192be2a142 Mon Sep 17 00:00:00 2001 From: Vincent Vermeulen Date: Sat, 24 Feb 2018 23:31:30 +0100 Subject: [PATCH] Highlight previous search so typing overwrites it When set to remember the last search, on next opening the menu it would display the last search and put the cursor at the end of it. If you wanted to do a new search you would first have to delete your previous search. More convenient if you starting typing it overwrites the last search and only if you place the cursor with arrow keys or mouse it switches to insert / append text to the last search. There was existing code that did in fact do that but it was in the wrong place. This patch puts it in the right place. Fixes #86. --- usr/lib/linuxmint/mintMenu/plugins/applications.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr/lib/linuxmint/mintMenu/plugins/applications.py b/usr/lib/linuxmint/mintMenu/plugins/applications.py index b355387..1bc78d1 100755 --- a/usr/lib/linuxmint/mintMenu/plugins/applications.py +++ b/usr/lib/linuxmint/mintMenu/plugins/applications.py @@ -503,7 +503,6 @@ class pluginclass( object ): else: self.changeTab( 1 ) - self.searchEntry.select_region( 0, -1 ) if self.rememberFilter and self.searchEntry.get_text().strip() != "": self.Filter(self.activeFilter[2], self.activeFilter[1]) @@ -546,6 +545,7 @@ class pluginclass( object ): self.searchEntry.grab_focus() if self.rememberFilter or not clear: self.searchEntry.set_position(-1) + self.searchEntry.select_region( 0, -1 ) else: self.searchEntry.set_text("")