From 9037bd2e2a15f808c0e194ccf9be81bd7269dec9 Mon Sep 17 00:00:00 2001 From: Arun Nanduri Date: Sat, 17 Sep 2022 19:51:52 -0700 Subject: [PATCH 1/2] Display text that was searched for in the bottom left corner. --- flamegraph.pl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/flamegraph.pl b/flamegraph.pl index d2172b61..a17f44cc 100755 --- a/flamegraph.pl +++ b/flamegraph.pl @@ -750,13 +750,14 @@ sub flow { @@ -1158,6 +1164,7 @@ sub flow { $im->stringTTF("search", $imagewidth - $xpad - 100, $fontsize * 2, "Search"); $im->stringTTF("ignorecase", $imagewidth - $xpad - 16, $fontsize * 2, "ic"); $im->stringTTF("matched", $imagewidth - $xpad - 100, $imageheight - ($ypad2 / 2), " "); +$im->stringTTF("searchedFor", $xpad, $imageheight - ($ypad2 / 2), " "); if ($palette) { read_palette(); From df8d564087806878438f3e8d5779c6b722f38814 Mon Sep 17 00:00:00 2001 From: Arun Nanduri Date: Sat, 17 Sep 2022 20:08:43 -0700 Subject: [PATCH 2/2] Replace text with empty string when hiding. --- flamegraph.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/flamegraph.pl b/flamegraph.pl index a17f44cc..2bef252e 100755 --- a/flamegraph.pl +++ b/flamegraph.pl @@ -1067,6 +1067,7 @@ sub flow { matchedtxt.classList.add("hide"); matchedtxt.firstChild.nodeValue = "" searchedFortxt.classList.add("hide"); + searchedFortxt.firstChiled.nodeValue = "" } } function search(term) {