Append space after completed line. With enhanced tab completion it poses no problem

This commit is contained in:
Asmageddon 2012-05-28 21:14:22 +02:00
parent 8678121210
commit 8d1e4297ec
1 changed files with 2 additions and 2 deletions

View File

@ -592,7 +592,7 @@ class Legacy(BaseMode, component.Component):
# line. # line.
for cmd in self.console._commands: for cmd in self.console._commands:
if cmd.startswith(line): if cmd.startswith(line):
possible_matches.append(cmd) possible_matches.append(cmd + " ")
line_prefix = "" line_prefix = ""
else: else:
@ -613,7 +613,7 @@ class Legacy(BaseMode, component.Component):
# the line. # the line.
elif len(possible_matches) == 1: elif len(possible_matches) == 1:
#We only want to print eventual colors or other control characters, not return them #We only want to print eventual colors or other control characters, not return them
new_line = line_prefix + possible_matches[0] new_line = line_prefix + possible_matches[0] + " "
new_line = format_utils.remove_formatting(new_line) new_line = format_utils.remove_formatting(new_line)
return (new_line, len(new_line)) return (new_line, len(new_line))
else: else: