浏览代码

fixed broken forward cursor fix #17

prozessorkern 5 年之前
父节点
当前提交
e5bf8572c2
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/shellmatta_utils.c

+ 1 - 1
src/shellmatta_utils.c

@@ -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';