shithub: orca

Download patch

ref: 825b4024ea54d406c397d5e22e9627b615b7a772
parent: 508189b4746b8e65645eb2e88550d7e3b162395d
author: Sigrid Haflínudóttir <ftrvxmtrx@gmail.com>
date: Sun Feb 16 13:52:41 EST 2020

plan9: better highlighting

--- a/plan9.c
+++ b/plan9.c
@@ -342,8 +342,6 @@
 
 	off = field.width*cury + curx;
 	csel = field.buffer[off];
-	if (csel == '.' || (mbuf.buffer[off] & (Mark_flag_input|Mark_flag_output)) != 0)
-		csel = 0;
 
 	bg = -1;
 	fg = -1;
@@ -363,7 +361,7 @@
 				attr &= ~Mark_flag_selected;
 
 			/* highlight the same char */
-			grouphl = c != '.' && csel == c && (x != curx || y != cury);
+			grouphl = c != '.' && csel == c && (x != curx || y != cury) && (attr & (Mark_flag_input|Mark_flag_lock|Mark_flag_output)) == 0;
 			if (grouphl)
 				attr |= Mark_flag_group_highlight;
 			else
@@ -407,7 +405,7 @@
 						fg = Dfhigh;
 					} else if (attr & Mark_flag_lock) {
 						bg = Dback;
-						fg = Dfmed;
+						fg = Dfhigh;
 					}
 				}