about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--code/fm.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/code/fm.rb b/code/fm.rb
index dff94c7a..4f1a5742 100644
--- a/code/fm.rb
+++ b/code/fm.rb
@@ -58,6 +58,16 @@ module Fm
 		end
 	end
 
+	def edit( filename, mode=nil, flags=nil )
+		file = Directory::Entry.new( filename )
+		file.refresh
+		raise "File doesn't exist" unless file.exists?
+		runcontext = RunContext.new( file, mode, flags, 'editor' )
+		externally do
+			Action.run( runcontext )
+		end
+	end
+
 	def reload_types()
 		old_verbose_level = $VERBOSE
 		$VERBOSE = nil