From 4a7e08f1c2ffb3780bd21e9ecbbcbaaf2d32f742 Mon Sep 17 00:00:00 2001 From: mathieui Date: Thu, 22 Nov 2012 00:29:44 +0100 Subject: Make the search usable again MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Disable the history when searching - → allow moving the cursor around to select a contact when searching - fix refresh issues --- src/roster.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/roster.py') diff --git a/src/roster.py b/src/roster.py index 8ae15490..a3741f82 100644 --- a/src/roster.py +++ b/src/roster.py @@ -180,6 +180,7 @@ class Roster(object): for group in self.groups.values(): if not show_offline and group.get_nb_connected_contacts() == 0: continue + before = length if not group.name in self.folded_groups: for contact in group.get_contacts(self.contact_filter): # We do not count the offline contacts (depending on config) @@ -190,7 +191,8 @@ class Roster(object): if not contact.folded: # One for each resource, if the contact is unfolded length += len(contact) - length += 1 # One for the group's line itself + if not self.contact_filter or before != length: + length += 1 # One for the group's line itself if needed return length def __repr__(self): -- cgit v1.2.3