Skip to content

Commit

Permalink
Minor bugfix for empty search
Browse files Browse the repository at this point in the history
The label showing the number of search results is now cleared when the user deletes an old search query
tlk authored and jrfonseca committed Sep 15, 2022
1 parent d4b734e commit ed1ce8f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions xdot/ui/window.py
Original file line number Diff line number Diff line change
@@ -671,6 +671,7 @@ def find_text(self, entry_text):
return sorted(found_items, key=operator.methodcaller('get_text'))

def textentry_changed(self, widget, entry):
self.find_count.set_label('')
self.find_index = 0
self.find_next_toolitem.set_sensitive(False)
entry_text = entry.get_text()
@@ -683,8 +684,6 @@ def textentry_changed(self, widget, entry):
dot_widget.set_highlight(found_items, search=True)
if found_items:
self.find_count.set_label('%d nodes found' % len(found_items))
else:
self.find_count.set_label('')

def textentry_activate(self, widget, entry):
self.find_index = 0

0 comments on commit ed1ce8f

Please sign in to comment.