summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/core/fm.py2
-rw-r--r--ranger/core/runner.py5
2 files changed, 4 insertions, 3 deletions
diff --git a/ranger/core/fm.py b/ranger/core/fm.py
index 59eb4e18..7ba07484 100644
--- a/ranger/core/fm.py
+++ b/ranger/core/fm.py
@@ -85,7 +85,7 @@ class FM(Actions, SignalDispatcher):
 		def mylogfunc(text):
 			self.notify(text, bad=True)
 		self.run = Runner(ui=self.ui, apps=self.apps,
-				logfunc=mylogfunc)
+				logfunc=mylogfunc, fm=self)
 
 		self.env.signal_bind('cd', self._update_current_tab)
 
diff --git a/ranger/core/runner.py b/ranger/core/runner.py
index 940f410e..8adf01d7 100644
--- a/ranger/core/runner.py
+++ b/ranger/core/runner.py
@@ -94,8 +94,9 @@ class Context(object):
 
 
 class Runner(object):
-	def __init__(self, ui=None, logfunc=None, apps=None):
+	def __init__(self, ui=None, logfunc=None, apps=None, fm=None):
 		self.ui = ui
+		self.fm = fm
 		self.logfunc = logfunc
 		self.apps = apps
 		self.zombies = set()
@@ -132,7 +133,7 @@ class Runner(object):
 		# creating a Context object and passing it to
 		# an Application object.
 
-		context = Context(app=app, files=files, mode=mode,
+		context = Context(app=app, files=files, mode=mode, fm=self.fm,
 				flags=flags, wait=wait, popen_kws=popen_kws,
 				file=files and files[0] or None)