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: Benno Schulenberg
Subject: Re: [Nano-devel] [PATCH] enable searching (^W) in a help text (^G)
Date: Mon, 21 Nov 2016 17:27:26 +0100

On Sun, Nov 20, 2016, at 11:56, Rishabh Dave wrote:
> Created a function help_refresh() and used it instead of
> total_refresh() when window size changes

Those two functions are nearly identical.  If you make sure
that title == NULL when not in MHELP, you could have done
without the first function by making a tiny tweak to the 
second.

> Should the help_text be re-copied
> to the file?

Of course -- it /must/ be rewrapped at the appropriate width.
The text should look exactly as it did before your patch.

> I have attached to two more patches "restore-title.patch"
> and "rewrap.patch" for the above issues individually

There was no need for that.

> Besides, if you do "./configure --disable-multibuffer && make"
> in the git repo, nano won't even compile.

You mean after your patch?  Then that is a fault in your patch.

> That is because help text assumes
> that we have facility of multiple buffers.

Hm.  So --disable-multibuffer implies --disable-help...
No, not nice.  It's probably better to discard the whole
--disable-multibuffer option.  Hm... no, not good either.

Let that be for now, we'll fix that later.

Anyway... apart from the refresh_help() function, there are
some twenty or thirty lines of duplicated code in your patch,
in the rewrapping part.  Brrrt!  No no no, no good.

Basing off your previous patch, you needed to change just
five lines to achieve text rewrapping upon a window resize.
See attached patch.

Benno

-- 
http://www.fastmail.com - Choose from over 50 domains or use your own

Attachment: minimal-needed-change.patch
Description: Text Data


reply via email to

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