diff --git a/src/apps/ssh_app.cpp b/src/apps/ssh_app.cpp index 349a767..01ed930 100644 --- a/src/apps/ssh_app.cpp +++ b/src/apps/ssh_app.cpp @@ -311,7 +311,9 @@ bool SshApp::onKey(const KeyEvent& e) { } void SshApp::update(uint32_t nowMs) { - if (!message_.empty() && nowMs - messageMs_ >= kMessageMs) { + // nowMs was read before this pass handled its keys: a message a key just set is "later" than it, + // and an unsigned difference would call that 49 days old, and clear it at once. + if (!message_.empty() && static_cast(nowMs - messageMs_) >= static_cast(kMessageMs)) { message_.clear(); requestRedraw(); }