timers work, fix crash when vscode window closes after timeout

This commit is contained in:
2026-02-07 22:54:31 +01:00
parent 6be70a7d93
commit a90d1c2f6c
7 changed files with 72 additions and 11 deletions

View File

@@ -41,6 +41,12 @@ class StringHelper {
if (input.length() <= maxSize) {
return input;
}
return input.substr(0, maxSize) + "...";
size_t len = maxSize;
while (len > 0 && (static_cast<unsigned char>(input[len]) & 0xC0) == 0x80) {
len--;
}
return input.substr(0, len) + "...";
}
};