gitk: Fix the find and highlight functions
commit4fb0fa197e14c82d64adb292320f9444d7ac46c5
authorPaul Mackerras <paulus@samba.org>
Wed, 4 Jul 2007 09:43:51 +0000 (4 19:43 +1000)
committerPaul Mackerras <paulus@samba.org>
Wed, 4 Jul 2007 09:43:51 +0000 (4 19:43 +1000)
tree10c0c16a690021e3c91fe6ff247356843eaa74cc
parent281404ca1db4c921ac162f3c03ae0688d25c5a65
gitk: Fix the find and highlight functions

This reworks the way that the "Find" button (and the /, ?, ^F, and ^G
keys) works.  Previously, pressing the "Find" button would cause gitk
to go off and scan through every commit to see which commits matched,
and the user interface was completely unreponsive during that time.
Now the searching is done in chunks using the scheduler, so the UI
still responds, and the search stops as soon as a matching commit is
found.

The highlighting of matches using a yellow background is now done in
the commit-drawing code and the highlighting code.  This ensures that
all the commits that are visible that match are highlighted without
the search code having to find them all.

This also fixes a bug where previously-drawn commits that need to be
highlighted were not being highlighted.

Signed-off-by: Paul Mackerras <paulus@samba.org>
gitk