From 00eaceffe81da0247d78a0286765ededf537cdca Mon Sep 17 00:00:00 2001
From: Ivica Ico Bukvic <ico@vt.edu>
Date: Sun, 24 Nov 2013 21:30:35 -0500
Subject: [PATCH] fixed regression in the search plugin due to use of negative
 (universal) font sizes.

---
 pd/src/search-plugin.tcl | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/pd/src/search-plugin.tcl b/pd/src/search-plugin.tcl
index e69300452..39e96e181 100644
--- a/pd/src/search-plugin.tcl
+++ b/pd/src/search-plugin.tcl
@@ -1352,26 +1352,26 @@ proc ::dialog_search::ctrl_bksp {mytoplevel} {
 proc ::dialog_search::font_size {text direction} {
     variable searchfont
     set offset {}
-    set min_fontsize 8
+    set min_fontsize -8
     if {$direction == 1} {
-	set offset 2
-    } else {
 	set offset -2
+    } else {
+	set offset 2
     }
     set update 1
     foreach tag [$text tag names] {
 	set val [$text tag cget $tag -font]
 	if {[string is digit -strict [lindex $val 1]] &&
-	    [expr {[lindex $val 1]+$offset}] < $min_fontsize} {
+	    [expr {[lindex $val 1]+$offset}] > $min_fontsize} {
 		set update 0
 	    }
     }
     if {$update} {
         foreach tag [$text tag names] {
 	    set val [$text tag cget $tag -font]
-	    if {[string is digit -strict [lindex $val 1]]} {
+	    if {[string is ascii -strict [lindex $val 1]]} {
 	        $text tag configure $tag -font "$searchfont \
-		    [expr -{max([lindex $val 1]+$offset,$min_fontsize)}]"
+		    [expr {min([lindex $val 1]+$offset,$min_fontsize)}]"
 	    }
         }
     }
-- 
GitLab