Subject: [sup-talk] little problem with the file browser

From: [email-masked] (Giorgio Lando)
Date: Sun, 13 Jan 2008 14:22:18 +0100

Hi, I have a little problem when I browse files (for example when
choosing an attachment). It happens only in some cases and in a way that
seems to be random (but may be I am missing some kind of regularity).

For some folders  (but only sometimes for each of
them) I do not get immediately a full display of the files in the
folder. The display starts at the last file, and the others are
displayed only if I press k to go up. At least in two cases the display
started not at the last file but at an intermediate files, so that only
some of the files can be immediately seen, while I had to press k to see
and select the others.

It does not ever happen to me with the first folder I enter (my home
directory), but only when I enter some of its subfolders.
I am pretty sure that they have no peculiar permissions (also because
everything can be finally seen and accessed, it is enough to press k).

If the description of the problem is unclear, I can provide a couple of
screenshots, just ask.

It happens with both git versions (and with the release)

Giorgio

---

From: [email-masked] (William Morgan)
Date: Sun, 13 Jan 2008 17:23:25 -0800

Excerpts from Giorgio Lando's message of Sun Jan 13 05:22:18 -0800 2008:
> choosing an attachment). It happens only in some cases and in a way
> that seems to be random (but may be I am missing some kind of
> regularity).

Does this patch fix the problem?

diff --git a/lib/sup/modes/file-browser-mode.rb b/lib/sup/modes/file-browser-mode.rb
index 3c68eec..b49f3f4 100644
--- a/lib/sup/modes/file-browser-mode.rb
+++ b/lib/sup/modes/file-browser-mode.rb
@@ -38,6 +38,7 @@ protected
 
   def reload
     regen_text
+    jump_to_start
     buffer.mark_dirty
   end

-- 
William <wmorgan-sup at masanjin.net>

---

From: [email-masked] (William Morgan)
Date: Sun, 13 Jan 2008 18:16:19 -0800

Excerpts from Giorgio Lando's message of Sun Jan 13 18:01:19 -0800 2008:
> 2008/1/14, William Morgan <wmorgan-sup at masanjin.net>:
> Yes, it does solve the problem!

Ok, I've pushed that patch to master.