Since the help text is searchable, an <End> would go to the end of the
text but would leave a blank line above the statusbar -- a blank line
that wasn't there before, and that is not reached when simply holding
down <Down> all the way from the top.
When nano has multiple files open, closing a help buffer should
not switch to the next buffer in the ring but to the preceding one,
because it was from there that the help screen was invoked.
However, prefer moving the starting point of the text backwards over
moving it forward, so that of the same paragraph more text is shown
instead of less. But scroll an empty line out of view -- no text is
"lost" then.
Allow the user to search in a help text with ^W and M-W.
Achieve this by not writing the help text directly to the screen
but first writing it to a temporary file and then opening this file
in a new buffer, and treating it specially: the normal file-reading
feedback is suppressed, the titlebar shows the headline of the text,
the cursor is hidden, and the menu is limited to just the up and down
movements and searching.
This fulfills https://savannah.gnu.org/bugs/?28994.
Signed-off-by: Rishabh Dave <rishabhddave@gmail.com>
Call something a buffer when it refers to a linked list of linestructs,
and call something a linestruct when it is a struct that describes a
single line.
File formats, appending and prepending, and backups are not available
when --enable-tiny is used, so prevent all relevant pieces of code from
getting compiled. And correct two misspelled ENABLE_TINY to NANO_TINY.
To avoid an ncurses hiccup (miscoloring) when running on musl.
This fixes https://savannah.gnu.org/bugs/?50787.
Reported-by: Avi Halachmi <avihpit@yahoo.com>
The cursor needs to be placed in its proper spot in the edit window
/only/ when nano is about to accept input from the user and needs to
show where this input will go.
(This might cause a scrolling issue to appear, because reset_cursor()
does not just place the cursor, it also recomputes current_y, which
is used in several places to determine whether and how much to scroll.
If it so happens, we'll deal with that fallout later.)
This also groups ^I and ^M together, and cutwordleft and cutwordright
(when they are bound). It furthermore makes that less pairs are now
mixed and instead consist of either two Ctrl or two Meta combos. In
short: it looks better in the default config. The only sacrifice is
that Verbatim is now split off from the other "inserting" keys.
When the user chooses not to open a file that some message refers to,
remove all messages for that file from the linting results, so the user
does not get asked about that same file again.
This fixes https://savannah.gnu.org/bugs/?47130.
The interval 2013-2017 for the Free Software Foundation is valid
because in those years there were releases with changes by either
Chris or David, and the GNU maintainers guide advises to mention
a new year in all files of a package, not just in the ones that
actually changed, and be done with it for the rest of the year.
To make dynamic Home and End work properly when double-width characters
straddle a chunk boundary, use the spot where the cursor is really shown
instead of the "actual x" position of the current character, because the
latter might be on the preceding row.
This fixes https://savannah.gnu.org/bugs/?50737.