summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/core/actions.py1
-rw-r--r--ranger/core/loader.py5
2 files changed, 5 insertions, 1 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py
index 50c322c4..6fd9ad09 100644
--- a/ranger/core/actions.py
+++ b/ranger/core/actions.py
@@ -600,7 +600,6 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware):
 				def on_after(signal):
 					exit = signal.process.poll()
 					content = signal.loader.stdout_buffer
-					content += signal.process.stdout.read()
 					data['foundpreview'] = True
 					if exit == 0:
 						data[(width, height)] = content
diff --git a/ranger/core/loader.py b/ranger/core/loader.py
index 85033881..02e8c232 100644
--- a/ranger/core/loader.py
+++ b/ranger/core/loader.py
@@ -94,6 +94,11 @@ class CommandLoader(Loadable, SignalDispatcher, FileManagerAware):
 								self.stdout_buffer += read
 				except select.error:
 					sleep(0.03)
+			if not self.silent:
+				for l in process.stderr.readlines():
+					self.fm.notify(l, bad=True)
+			if self.read:
+				self.stdout_buffer += process.stdout.read()
 		self.finished = True
 		self.signal_emit('after', process=process, loader=self)