diff options
Diffstat (limited to 'gdb/completer.c')
-rw-r--r-- | gdb/completer.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gdb/completer.c b/gdb/completer.c index 68e9171..f9ece59 100644 --- a/gdb/completer.c +++ b/gdb/completer.c @@ -1270,10 +1270,13 @@ complete_line_internal_1 (completion_tracker &tracker, word = tmp_command + point - strlen (text); } - if (point == 0) + /* Move P up to the start of the command. */ + p = skip_spaces (p); + + if (*p == '\0') { - /* An empty line we want to consider ambiguous; that is, it - could be any command. */ + /* An empty line is ambiguous; that is, it could be any + command. */ c = CMD_LIST_AMBIGUOUS; result_list = 0; } |