diff options
author | hut <hut@lavabit.com> | 2009-07-19 01:21:11 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2009-07-19 01:21:11 +0200 |
commit | df465458df2af93d483f9b323f1acaa037fd68a3 (patch) | |
tree | 204ef966b95c9169eb1465efb7f1c4057b3bc7db /code | |
parent | 29fe5ed49c5f794416e070a624939b1d2925076f (diff) | |
download | ranger-df465458df2af93d483f9b323f1acaa037fd68a3.tar.gz |
bugfix: list_dir_first was ignored in previews sometimes
Diffstat (limited to 'code')
-rw-r--r-- | code/directory.rb | 2 | ||||
-rw-r--r-- | code/draw.rb | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/code/directory.rb b/code/directory.rb index e7431399..d00a2eb6 100644 --- a/code/directory.rb +++ b/code/directory.rb @@ -57,6 +57,7 @@ class Directory end def self.filter() @@filter end + def schedule_resort() @sort_time = BAD_TIME end def scheduled?() @scheduled end def read?() @read end @@ -159,6 +160,7 @@ class Directory @file_size += f.size if f.file? end @read = true + schedule_resort end # def refresh() diff --git a/code/draw.rb b/code/draw.rb index 43f2b8e1..e8a1ccdc 100644 --- a/code/draw.rb +++ b/code/draw.rb @@ -66,8 +66,6 @@ module Fm break if (f = d.files[lpo]) == nil - d.sort_if_needed - mycolor = if lpo == d.pos if infos Color.selected_current_row @@ -254,7 +252,9 @@ module Fm begin if Option.preview if cf.dir? - put_directory(3, @dirs[cf.path]) + dir = @dirs[ cf.path ] + dir.sort_if_needed + put_directory(3, dir) elsif cf.file? column_put_file(3, cf) else |