@@ -145,7 +145,7 @@ void utils_forwardCursor(shellmatta_instance_t *inst, uint32_t length)
char terminalCmd[16];
size_t size;
- length = SHELLMATTA_MAX (length, (inst->inputCount - inst->cursor));
+ length = SHELLMATTA_MIN (length, (inst->inputCount - inst->cursor));
if (length > 0u)
{
terminalCmd[0] = '\e';