shithub: orca

Download patch

ref: 508189b4746b8e65645eb2e88550d7e3b162395d
parent: ba578071fa5b685ecb4fe6a4f7befcbd0858d491
author: Sigrid Haflínudóttir <ftrvxmtrx@gmail.com>
date: Sun Feb 16 12:22:15 EST 2020

plan9: highlight sends

--- a/plan9.c
+++ b/plan9.c
@@ -12,6 +12,8 @@
 
 #define MIN(x,y) ((x)<(y)?(x):(y))
 #define MAX(x,y) ((x)>(y)?(x):(y))
+#define is_movement(c) (c == 'W' || c == 'N' || c == 'E' || c == 'S')
+#define is_send(c) (c == ':' || c == '%' || c == '!' || c == '?' || c == ';' || c == ';' || c == '$')
 
 enum {
 	Txtoff = 16,
@@ -396,7 +398,7 @@
 				if (c == '#') {
 					fg = Dfmed;
 				} else {
-					if (c >= 'A' && c <= 'Z' && c  != 'W' && c != 'N' && c != 'E' && c != 'S') {
+					if ((c >= 'A' && c <= 'Z' && !is_movement(c)) || is_send(c)) {
 						bg = Dbmed;
 						fg = Dfinv;
 					}