summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/gui/widgets/console.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/ranger/gui/widgets/console.py b/ranger/gui/widgets/console.py
index 5c888da5..6562276f 100644
--- a/ranger/gui/widgets/console.py
+++ b/ranger/gui/widgets/console.py
@@ -386,7 +386,10 @@ class OpenConsole(ConsoleWithTab):
 
 	def _get_tab(self):
 		# for now, just add " %s"
-		return self.line + ' %s'
+		result = self.line
+		if result and result[-1] != ' ':
+			result += ' '
+		return result + '%s '
 
 	def _substitute_metachars(self, command):
 		dct = {}