[Top][All Lists]

[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: Mon, 14 Nov 2016 17:34:28 +0530

On Sun, Nov 13, 2016 at 7:07 PM, Benno Schulenberg
<address@hidden> wrote:
> With your patch applied, run 'src/nano NEWS' and then
> type: ^G ^X.  See how the titlebar still says "Main
> nano help text" and "View".  You need to redraw the
> titlebar when exiting from help.
> Now type ^G ^W ^T ^T.  See how now all the shortcuts
> from a normal search menu are displayed, and you can
> type M-J to "justify" (that is: mess up) the help text.
> I think it is best to remove ^T from MFINDINHELP.
> Restart nano, type ^G, and resize the window.  See how
> "View" disappears and the help text title gets replaced
> with something like "File: /tmp/nano.8aZPYs".

These are fixed. (Second one hadn't to be, as we removed the option
itself from the help's search menu)

>> I think both of them are more redundant
>> on search's bottombars than backward-search.
> For now, remove everything that you don't /need/.
> And all you need in MFINDINHELP is Cancel.
> I would much rather have Re-search in the help menu.
> So... I would say, put back the ^L Refresh shortcut, and
> add ^W and M-W in the second column.

Okay, so help menu has one more column and help's search menu has only
one option -- cancel. Adding re-search, made me shift a declaration of
answer_copy to the beginning. I also renamed it to saved_answer (just
like margin_copy was renamed to saved_margin).

> So, to make reading your
> patch easier, to make it easier to see /what/ you changed, don't
> change lines where you don't change anything in the content.

For sake of readability of *patch*, got it. I was trying to make patch
look more final.

> Also, please add comment lines to explain the /intent/ of
> blocks of code.

I have added 2 comments in src/help.c. I think rest are either too
short, self-explanatory or both.

Last time on removing MFINDINHELP from MMOST wrecked all functions at
prompt (like history, jumps to prev/next word, word completion, etc.)
and I forgot to fix them. This time they are fixed.

Attachment: 0001-feature-add-search-facility-to-help.patch
Description: Text Data

reply via email to

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