From b2f78786a5cabdbefd1ae1bd20d9e404bc63cdd6 Mon Sep 17 00:00:00 2001 From: Asmageddon Date: Tue, 29 May 2012 17:34:58 +0200 Subject: [PATCH] Don't append a space after directory completion --- deluge/ui/console/modes/legacy.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/deluge/ui/console/modes/legacy.py b/deluge/ui/console/modes/legacy.py index 0a46b051b..d5be1c778 100644 --- a/deluge/ui/console/modes/legacy.py +++ b/deluge/ui/console/modes/legacy.py @@ -615,8 +615,11 @@ class Legacy(BaseMode, component.Component): # return it, else we need to print out the matches without modifying # the line. elif len(possible_matches) == 1: + #Do not append space after directory names + new_line = line_prefix + possible_matches[0] + if not new_line.endswith("/") and not new_line.endswith(r"\\"): + new_line += " " #We only want to print eventual colors or other control characters, not return them - new_line = line_prefix + possible_matches[0] + " " new_line = format_utils.remove_formatting(new_line) return (new_line, len(new_line)) else: