Misc fixes and improvements

This commit is contained in:
2024-10-05 21:20:21 +02:00
parent f389e5985f
commit 7a37ebe234
3 changed files with 19 additions and 10 deletions
+4 -1
View File
@@ -117,7 +117,7 @@ class MessageBox
$scrollTop = $this->scroll;
$scrollBottom = $scrollTop + $visibleItems - 1;
$thumbTop = round(($visibleItems - 1) / count($wrapped) * $scrollTop);
$thumbBottom = round(($visibleItems - 1) / count($wrapped) * $scrollBottom);
$thumbBottom = round($visibleItems / count($wrapped) * $scrollBottom);
echo "\e[40;37m";
$this->terminal
@@ -139,6 +139,9 @@ class MessageBox
} elseif (str_starts_with($line, "### ")) {
$item = " " . mb_substr($line, 4);
$pre = "\e[1;3m"; $post = "\e[23m";
} elseif (str_starts_with($line, "/ ")) {
$item = " " . mb_substr($line, 2);
$pre = "\e[3m"; $post = "\e[23m";
} else {
$item = " " . $line;
$pre = null; $post = null;