about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/actions.py5
-rw-r--r--ranger/applications.py5
2 files changed, 6 insertions, 4 deletions
diff --git a/ranger/actions.py b/ranger/actions.py
index f4c13ad2..a4b90647 100644
--- a/ranger/actions.py
+++ b/ranger/actions.py
@@ -4,6 +4,7 @@ import shutil
 from ranger.shared import EnvironmentAware, SettingsAware
 from ranger import fsobject
 from ranger.ext.trim import trimmed_lines_of_docstring
+from ranger.gui.widgets import console_mode as cmode
 
 from ranger.applications import run
 
@@ -149,8 +150,8 @@ class Actions(EnvironmentAware, SettingsAware):
 
 		if not self.env.enter_dir(cf):
 			if sel:
-				if not self.execute_file(sel, mode=mode):
-					self.open_console('@')
+				if self.execute_file(sel, mode=mode) is None:
+					self.open_console(cmode.OPEN_QUICK)
 
 	def history_go(self, relative):
 		"""Move back and forth in the history"""
diff --git a/ranger/applications.py b/ranger/applications.py
index a3e3aeea..c10df6f8 100644
--- a/ranger/applications.py
+++ b/ranger/applications.py
@@ -191,11 +191,12 @@ class AppContext(object):
 		else:
 			self._activate_ui(False)
 			try:
-				p = Popen(**kw)
+				process = Popen(**kw)
 				if self.wait:
-					waitpid_no_intr(p.pid)
+					waitpid_no_intr(process.pid)
 			finally:
 				self._activate_ui(True)
+				return process
 
 	def _activate_ui(self, boolean):
 		if self.fm and self.fm.ui: