diff --git a/src/Editor/Menu.php b/src/Editor/Menu.php index 16b1da0..4698c1c 100644 --- a/src/Editor/Menu.php +++ b/src/Editor/Menu.php @@ -110,6 +110,7 @@ class Menu } elseif (is_null($item)) { $item = str_repeat(" ", $width - 2); } else { + $item = mb_substr($item, 0, $width); $item = " " . $item . str_repeat(" ", $width - 3 - $this->itemlen($item)) . "\e[40;37m"; $item = (($n == $this->index)?"\e[37;44m":"\e[40;37m") . $item; }