diff --git a/src/utils/edit.c b/src/utils/edit.c index 62ba0e135..a43cf2fe6 100644 --- a/src/utils/edit.c +++ b/src/utils/edit.c @@ -364,7 +364,7 @@ static void complete(int list) end = cmdbuf_pos; start = end; - while (start > 0 && cmdbuf[start] != ' ') + while (start > 0 && cmdbuf[start - 1] != ' ') start--; plen = end - start;