about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2011-10-08 04:50:22 +0200
committerhut <hut@lavabit.com>2011-10-08 04:51:49 +0200
commitabb2184711491b4dfbaeaf19bc49b1055943fa86 (patch)
treebaf87b0d30d441eac10b2fb2ef6336a91dc64088
parent8a80977137c18d9ba25d399287d16492bc2b5e69 (diff)
downloadranger-abb2184711491b4dfbaeaf19bc49b1055943fa86.tar.gz
defaults.commands: Dynamically choose editor in :bulkrename
-rw-r--r--ranger/defaults/commands.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/ranger/defaults/commands.py b/ranger/defaults/commands.py
index 29c086f8..504ec5c8 100644
--- a/ranger/defaults/commands.py
+++ b/ranger/defaults/commands.py
@@ -796,12 +796,13 @@ class bulkrename(Command):
 		cmdfile.write(b"# Please double-check everything, clear the file to abort.\n")
 		if py3:
 			cmdfile.write("\n".join("mv -vi " + esc(old) + " " + esc(new) \
-					for old, new in zip(filenames, new_filenames) if old != new).encode("utf-8"))
+				for old, new in zip(filenames, new_filenames) \
+				if old != new).encode("utf-8"))
 		else:
 			cmdfile.write("\n".join("mv -vi " + esc(old) + " " + esc(new) \
-					for old, new in zip(filenames, new_filenames) if old != new))
+				for old, new in zip(filenames, new_filenames) if old != new))
 		cmdfile.flush()
-		self.fm.run(['vim', cmdfile.name])
+		self.fm.execute_file([File(cmdfile.name)], app='editor')
 		self.fm.run(['/bin/sh', cmdfile.name], flags='w')
 		cmdfile.close()