console.lua: use `terminal_display_width` when picking longest menu item
Previously this function would just count bytes which was very easily broken by incantations like `Ő̶̧͍̹͔̮̮̦͌̈̌̂́̊͜K͖̮̼̯͖͆͋̓̀̕` which take up 52 bytes while being just 2 normal width characters visually. `terminal_display_width` correctly counts `Ő̶̧͍̹͔̮̮̦͌̈̌̂́̊͜K͖̮̼̯͖͆͋̓̀̕` as 2 visual characters. Note: GitHub strips all these in their web UI but there are many Unicode combining characters after each letter of the `OK`s above that produce a "cursed" text effect. Fixes #17772
H
Hubert Głuchowski committed
ac3b6044d088b21013a1df3be41f9c8b2f308b54
Parent: c202be1
Committed by Kacper Michajłow <kasper93@gmail.com>
on 4/21/2026, 4:17:22 PM