[Top][All Lists]

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

Re: [Nano-devel] [PATCH] browser: keep selection despite of change in nu

From: Benno Schulenberg
Subject: Re: [Nano-devel] [PATCH] browser: keep selection despite of change in number of files in cwd
Date: Sun, 08 May 2016 21:29:22 +0200

On Sun, May 8, 2016, at 17:51, Rishabh Dave wrote:
> Implementation is done and patch works as we want it to. 


> The reason
> for valgrind to point at closedir() was that I forgot to open
> directory as there spread across two functions.

Ah, yes, that is messy.  I will rearrange that later.

> There is one aspect that I am confused about: why do we want to
> replace 'kbinput=KEY_WINCH' with 'sitting_on'?

No, I was talking about renaming 'prev_dir' to 'sitting_on',
but that will come later.

What must be removed, though, is the 'kbinput = KEY_WINCH'
from the refresh case, because when opendir succeeds, it is
superfluous, and if opendir fails, there is little point in
trying a second time.  See attached version of the patch.

Oh, and if dir==NULL, the error is not in reading the selected
file but in reading the current directory, the path.

> Another thing, since browser_select_dirname() does not return any
> value, (so)  I preferred to do the 'conspicuous change' there as
> 'selected' is static and required only a decrement.


If you are content with the current form of the patch, make a
commit and attach the result to the bug and here.


-- - Email service worth paying for. Try it for free

Attachment: retain-the-selected-file-in-the-face-of-change.patch
Description: Text Data

reply via email to

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