[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: |
Thu, 24 Nov 2016 22:19:26 +0530 |
On Mon, Nov 21, 2016 at 9:57 PM, Benno Schulenberg
<address@hidden> wrote:
>
> 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.
Didn't get you... Are you talking about the following change in the
total_refresh()?
titlebar(currmenu == MFINDINHELP ? title : NULL);
I previously avoided it as it makes a variable global (variable title
namely) and the update/s in topwin is visible (you could see title in
topwin change in quick successions).
>> 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 /initially/ thought rewrapping and recopying the help text and
closing and reopening the buffer would be lengthy enough to introduce
a lag. So I was wondering about the possible options.
>> 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.
Is having top 2 help functions, one for each with and without
multibuffer disabled, is bad option?
> Basing off your previous patch, you needed to change just
> five lines to achieve text rewrapping upon a window resize.
> See attached patch.
Oh... It is much better this way. I should have considered this
common sense: don't repeat the code. But I, unfortunately, miss these
good practices despite of the fact that I know them. :|
By the way, what is the effect is achieved by this change? Is it only
an optimization -- avoiding considerations of locking for help text? I
couldn't figure.
- if (has_valid_path(realname)) {
+ if (currmenu != MHELP && has_valid_path(realname)) {
- Re: [Nano-devel] [PATCH] bug #28994: [Request] enable search (^W) in help (^G), Rishabh Dave, 2016/11/05
- Re: [Nano-devel] [PATCH] enable searching (^W) in a help text (^G), Benno Schulenberg, 2016/11/09
- Re: [Nano-devel] [PATCH] enable searching (^W) in a help text (^G), Rishabh Dave, 2016/11/11
- Re: [Nano-devel] [PATCH] enable searching (^W) in a help text (^G), Benno Schulenberg, 2016/11/11
- Re: [Nano-devel] [PATCH] enable searching (^W) in a help text (^G), Rishabh Dave, 2016/11/12
- Re: [Nano-devel] [PATCH] enable searching (^W) in a help text (^G), Benno Schulenberg, 2016/11/13
- Re: [Nano-devel] [PATCH] enable searching (^W) in a help text (^G), Rishabh Dave, 2016/11/14
- Re: [Nano-devel] [PATCH] enable searching (^W) in a help text (^G), Benno Schulenberg, 2016/11/15
- Re: [Nano-devel] [PATCH] enable searching (^W) in a help text (^G), Rishabh Dave, 2016/11/20
- Re: [Nano-devel] [PATCH] enable searching (^W) in a help text (^G), Benno Schulenberg, 2016/11/21
- Re: [Nano-devel] [PATCH] enable searching (^W) in a help text (^G),
Rishabh Dave <=
- Re: [Nano-devel] [PATCH] enable searching (^W) in a help text (^G), Benno Schulenberg, 2016/11/24