]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
edit: Really fix the completion of last character
authorJouni Malinen <j@w1.fi>
Sat, 20 Nov 2010 10:27:06 +0000 (12:27 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 20 Nov 2010 10:27:06 +0000 (12:27 +0200)
The previous commit broke completion in various places. The proper
way of handling the completion of full word is to verify whether
there are more than one possible match at that point.

src/utils/edit.c

index 93a3078e32e4e9fa4377125e261e8e6def7db83e..448d584df5b23c4308af92969acad7c5dfce0d66 100644 (file)
@@ -377,7 +377,7 @@ static void complete(int list)
        }
 
        len = max_common_length(c);
-       if (len < plen) {
+       if (len <= plen && count > 1) {
                if (list) {
                        edit_clear_line();
                        printf("\r");