File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -376,6 +376,13 @@ protected function drawMenuItem(MenuItemInterface $item, bool $selected = false)
376
376
}
377
377
378
378
return array_map (function ($ row ) use ($ invertedColour , $ notInvertedColour , $ borderColour ) {
379
+
380
+ $ rightPadding = $ this ->style ->getRightHandPadding (mb_strlen (s::stripAnsiEscapeSequence ($ row )));
381
+
382
+ if ($ rightPadding < 0 ) {
383
+ $ rightPadding = 0 ;
384
+ }
385
+
379
386
return sprintf (
380
387
"%s%s%s%s%s%s%s%s%s%s%s%s%s \n" ,
381
388
str_repeat (' ' , $ this ->style ->getMargin ()),
@@ -385,7 +392,7 @@ protected function drawMenuItem(MenuItemInterface $item, bool $selected = false)
385
392
$ invertedColour ,
386
393
str_repeat (' ' , $ this ->style ->getPadding ()),
387
394
$ row ,
388
- str_repeat (' ' , $ this -> style -> getRightHandPadding ( mb_strlen (s:: stripAnsiEscapeSequence ( $ row ))) ),
395
+ str_repeat (' ' , $ rightPadding ),
389
396
$ notInvertedColour ,
390
397
$ borderColour ,
391
398
str_repeat (' ' , $ this ->style ->getBorderRightWidth ()),
You can’t perform that action at this time.
0 commit comments