mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-08-05 19:56:11 +00:00
fix(messages): allow full-length text on the compose/send paths too
After widening the history buffers, the compose side was still the bottleneck: the keyboard capped input at 139 bytes and the quick-message expand buffers were 140. Raise KB_MAX_LEN to 160 (MeshCore's MAX_TEXT_LEN) and size the expand/compose buffers to MSG_TEXT_BUF, so a message can be typed, expanded, sent, stored and displayed at the full protocol length on every path. The custom-message editor now passes an explicit max bound to its 140-byte store, so the wider keyboard buffer can't overflow it; the bot editor already passed per-field maxima. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -810,7 +810,10 @@ public:
|
||||
if (isMsgSlot(_selected) && enter) {
|
||||
int slot = msgSlotIndex(_selected);
|
||||
_edit_slot = slot;
|
||||
_kb.begin(p ? p->custom_msgs[slot] : "");
|
||||
// Bound to the custom_msgs store (140 B) so the wider keyboard buffer
|
||||
// can't overflow it on save.
|
||||
_kb.begin(p ? p->custom_msgs[slot] : "",
|
||||
p ? (int)sizeof(p->custom_msgs[slot]) - 1 : KB_MAX_LEN);
|
||||
kbAddSensorPlaceholders(_kb, &sensors);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user