Prevent menu items from overflowing
This commit is contained in:
		@@ -110,6 +110,7 @@ class Menu
 | 
				
			|||||||
            } elseif (is_null($item)) {
 | 
					            } elseif (is_null($item)) {
 | 
				
			||||||
                $item = str_repeat(" ", $width - 2);
 | 
					                $item = str_repeat(" ", $width - 2);
 | 
				
			||||||
            } else {
 | 
					            } else {
 | 
				
			||||||
 | 
					                $item = mb_substr($item, 0, $width);
 | 
				
			||||||
                $item = " " . $item . str_repeat(" ", $width - 3 - $this->itemlen($item)) . "\e[40;37m";
 | 
					                $item = " " . $item . str_repeat(" ", $width - 3 - $this->itemlen($item)) . "\e[40;37m";
 | 
				
			||||||
                $item = (($n == $this->index)?"\e[37;44m":"\e[40;37m") . $item;
 | 
					                $item = (($n == $this->index)?"\e[37;44m":"\e[40;37m") . $item;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user