[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nano-devel] [PATCH] browser: merging opendir() in to one

From: Rishabh Dave
Subject: Re: [Nano-devel] [PATCH] browser: merging opendir() in to one
Date: Wed, 18 May 2016 20:41:01 +0530

On Sun, May 15, 2016 at 5:55 PM, Benno Schulenberg
<address@hidden> wrote:
> First some details about the patch.
> After say_there_is_no_help(); there should be no
> goto read_directory_contents; -- you only need to refresh
> the list when an actual help text has been shown.

I did that, refresh only when help text is shown, but I was little
baffled around the code. So please do have a look at that section for
it's correctness.

> Start over, and do this one step at a time.  First just move the
> opendir() from do_browse_from() to do_browser(), and in the
> process remove the then superfluous paramenter 'dir'.  Also
> move the closedir() from browser_init() to do_browser(), so
> that all opening and closing happens in the same function.
> First get that right, in one patch, without changing any behavior.
> Second, do the merge of the other opendir()s into one; you
> will probably have to keep the first one separate, because it
> behaves different and should not blank the statusbar and such.

I restarted writing entire patch as per your instructions. I tested it
and I believe there is no change in behaviour. I've kept closedir()
from browser_init() right next to it (browser_init()) to avoid keeping
closedir() open for long time.

opendir() that comes under 'if (kbinput == KEY_WINCH)' has also been
merged. That actually happens naturally when opendir() is brought
under the label 'read_browser_directory' and I couldn't see any
changes in behaviour. So, I kept it as it is (with patch applied). If
it causes a difference (in behaviour) would you please provide the
steps to see it? I feel little uncomfortable around code where there

> [..] behaves different and should not blank the statusbar and such.

During this I noticed, statusbar messages disappear when we resize
window. If you were not referring to that above, I will try to write a
different patch for that after this one.

And sorry for the delay in reply.

Attachment: merge-opendir-new.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]