impr: Make pattern tooltips more appropriately sized

This commit is contained in:
WerWolv
2024-07-26 19:38:21 +02:00
parent 1b26db40f7
commit d097f6ada0
2 changed files with 5 additions and 4 deletions

View File

@@ -685,7 +685,7 @@ namespace hex {
return string;
// If the string is longer than the max length, find the last space before the max length
auto it = string.begin() + maxLength / 2;
auto it = string.begin() + maxLength;
while (it != string.begin() && !std::isspace(*it)) --it;
// If there's no space before the max length, just cut the string