nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] [PATCH] enable searching (^W) in a help text (^G)


From: Rishabh Dave
Subject: Re: [Nano-devel] [PATCH] enable searching (^W) in a help text (^G)
Date: Fri, 16 Dec 2016 01:25:48 +0530

On Sat, Dec 10, 2016 at 7:39 PM, Benno Schulenberg
<address@hidden> wrote:
> Indeed, roughly.  It quite closely mimics the current behavior.
> But in fact I don't like it that the top line of the help window
> scrolls down when you make the window narrower (when you first
> have done a PageDown or two).  It would be nicer if it behaved
> like an edit window: the top line stays the top line -- unless
> the line with the cursor would be pushed off the screen, then
> the screen is scrolled to keep the cursor in view.  But in the
> help screen there is normally no cursor, and the invisible cursor
> is sitting on the top line, so... keeping that top line in a fixed
> position would be best.

Attached patch adds the ability to stay exactly at the same place.
However, there is still minute flaw. Under some cases where window
size are changed to minimum, top line moves a line below as earlier
top line is split into two. Is that fine?

>> I have tried following code, by adding it after the display_buffer() -
>>
>>     if (redisplaying)
>>         while (openfile->edittop->lineno < saved_top_lineno)
>>             do_down(TRUE);
>>
>> But openfile->edittop->lineno holds line number of the last line
>> (instead it should have been holding line number of first line),
>
> Weird.  It means the code is doing something smurfy [...].

> About your patch:
>
> +bool first_time;
>
> This sounds like an optimization again. [...]

Both the above issues (abnormal behaviour that first_time countered
and the edittop issue) were related and are solved in current attached
patch.

Attachment: reposition.patch
Description: Text Data


reply via email to

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