From 6aaac9200db8d00bb47e522be7378e914508a0b9 Mon Sep 17 00:00:00 2001 From: nadrad Date: Sat, 10 Sep 2022 10:59:22 +0200 Subject: [PATCH] code styling for the active node --- h-m-m | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/h-m-m b/h-m-m index 883d358..83a486d 100755 --- a/h-m-m +++ b/h-m-m @@ -2193,11 +2193,17 @@ function display(&$mm, $force_center = false) .reset_color .mb_substr($line, $x2) ; + else // styling the codes when the node is not active + $line = + mb_ereg_replace + ( + '\b(.\d)\. ' + ,dim_on.'\\1. '.dim_off + ,$line + ) + ; - // this is here, because it doesn't need coordinates. - // only inverting instead of giving another color, - // because, otherwise, it would conflict with the active - // node's highlight and it's a little complicated to fix. + // styling the search results if ($mm['query'] ?? '' != '') $line = @@ -2236,17 +2242,6 @@ function display(&$mm, $force_center = false) ) ; - // styling the codes - - $line = - mb_ereg_replace - ( - '\b(.\d)\. ' - ,dim_on.'\\1. '.dim_off - ,$line - ) - ; - // styling "???" $line =