diff mbox series

gitk: Un-hide selection in added and removed text and search results

Message ID 2ecfbb59-3a65-9db0-4ff7-e649ab6dfb6e@kdbg.org (mailing list archive)
State New, archived
Headers show
Series gitk: Un-hide selection in added and removed text and search results | expand

Commit Message

Johannes Sixt April 8, 2020, 6:36 p.m. UTC
The recently introduced background for the tags that highlight
added and removed text takes precedence over the background color
of the selection. But selected text is more important than the
highlighted text. Make the highlighting tags the lowest priority.

The same argument holds for the highlight of search results. But
search results are a bit more important. Therefore, make them
also low-priority, but just above the added-and-removed tags.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
---
Am 07.04.20 um 18:42 schrieb Johannes Sixt:
> There is one major gripe, though: the new background color overrides the
> selection background and makes the selection invisible. This is a
> showstopper.

Here is a fix for that on top of Stefan's patch. The patch text works
without Stefan's patch (and would un-hide the selection in search
results), but the commit message would have to be adjusted.

-- Hannes

 gitk | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/gitk b/gitk
index 4129c0ba95..d4dd9aca64 100755
--- a/gitk
+++ b/gitk
@@ -2468,6 +2468,11 @@  proc makewindow {} {
     $ctext tag conf currentsearchhit -back $currentsearchhitbgcolor
     $ctext tag conf wwrap -wrap word -lmargin2 1c
     $ctext tag conf bold -font textfontbold
+    # set these to the lowest priority:
+    $ctext tag lower currentsearchhit
+    $ctext tag lower found
+    $ctext tag lower dresult
+    $ctext tag lower d0
 
     .pwbottom add .bleft
     if {!$use_ttk} {