Compare commits

...

7 commits

Author SHA1 Message Date
nadrad 1caa360a53 improved width fix: changing strlen to strwidth 2024-04-08 08:28:53 +02:00
nadrad e7c02c8249 Merge branch 'main' of https://github.com/nadrad/h-m-m 2024-04-08 08:27:04 +02:00
nadrad a7ac9a254d nothing! 2024-04-08 08:26:55 +02:00
Nader K. Rad 3bd33805dc
Merge pull request #72 from wschroeder/main
fix(display): ensure base line length is equal to terminal width even…
2024-04-08 08:26:18 +02:00
William Schroeder 63ef829129 fix(display): ensure base line length is equal to terminal width even if map line length is shorter 2024-04-07 21:57:21 -05:00
nadrad 0ff42afd04 Merge branch 'main' of https://github.com/nadrad/h-m-m 2024-04-07 14:16:52 +02:00
nadrad e6bf8e4d7e I don't remember anymore! 2024-04-07 14:16:42 +02:00

6
h-m-m
View file

@ -3374,6 +3374,12 @@ function display(&$mm, $force_center = false)
else
$line = $blank;
// ensuring that the line is long enough even if the map line is
// shorter than the terminal width
if (mb_strwidth($line) < $mm['terminal_width'])
$line .= str_repeat(' ', $mm['terminal_width'] - mb_strwidth($line));
// this one really depends on (x,y), but after this, the
// coordinates are not reliable anymore because of the
// added escape codes.