]> git.cworth.org Git - sup/commitdiff
bugfix: file-browser-mode should reset the cursor when entering a new dir
authorWilliam Morgan <wmorgan-sup@masanjin.net>
Mon, 14 Jan 2008 01:23:49 +0000 (17:23 -0800)
committerWilliam Morgan <wmorgan-sup@masanjin.net>
Mon, 14 Jan 2008 01:27:52 +0000 (17:27 -0800)
Otherwise, entering a new directory can start with the cursor and page at
a weird location, e.g. with the very last file appearing at the top of
the screen.

lib/sup/modes/file-browser-mode.rb

index 3c68eec6de8bddeeebad8960e55d535f5152649c..b49f3f4e8f8a13d8b8f66608627c3b24d29f7a6d 100644 (file)
@@ -38,6 +38,7 @@ protected
 
   def reload
     regen_text
+    jump_to_start
     buffer.mark_dirty
   end