about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--code/directory.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/code/directory.rb b/code/directory.rb
index ef4f1ba6..ab636b0b 100644
--- a/code/directory.rb
+++ b/code/directory.rb
@@ -182,6 +182,8 @@ class Directory
 #		end
 #	end
 	def refresh(info=false)
+		oldfile = @pointed_file
+
 		if File.mtime(@path) != @mtime
 			read_dir
 		end
@@ -190,6 +192,10 @@ class Directory
 			get_file_info 
 		end
 		sort_if_needed
+
+		if @files.include? oldfile
+			self.pointed_file = oldfile
+		end
 	end
 
 	def schedule()