Also, reshuffle one call and drop another: the cursor has been placed
fifteen lines earlier (either directly or in edit_refresh()).
(Important test case: toggling softwrap.)
For consistency of style, the number of lines read should only be shown
when inserting a file into the current buffer, not when reading it into
a new buffer.
This amends the fix for https://savannah.gnu.org/bugs/?61509.
Inserting another file is somewhat unusual -- it's better to give
feedback about it.
This fixes https://savannah.gnu.org/bugs/?61509.
Bug existed since version 5.5, since the minibar was introduced.
Things like "Cancelled" and "Undid addition" are not needed. They
are nice for discovery, but become distracting once you know nano.
This fixes https://savannah.gnu.org/bugs/?61508.
Bug existed since commit 03637030 from last week.
Also when adjusting the viewport, after the cursor has gone offscreen
(by toggling the help lines, for example), should the SHIM be applied.
This fixes https://savannah.gnu.org/bugs/?61503.
Bug existed since commit 03637030 from last week.
It's an editor -- the largest element should be the text to be edited,
not some part of the interface.
(It would be better if the edit window was always the largest element,
larger than or equal to all interface elements combined. But that is
something for another time.)
There is no need to prevent NO_HELP from being unset on terminals
with fewer than five rows, because the bottombars() routine already
automatically suppresses the help lines on such terminals.
This improves the fix for https://savannah.gnu.org/bugs/?61497.
(The problem with absent feedback is still there when the terminal
has just one row.)
This should make it slightly easier for translators when they compare
their PO file to nano's main help text.
Also, drop a die() -- a forgotten toggle name is not worth dying over.
When the syntax contains a 'tabgives' command, toggling the conversion
of tabs-to-spaces has no effect -- not for the current file. So, tell
the user that and don't change the flag.
This fixes https://savannah.gnu.org/bugs/?61496.
Bug existed since version 4.5, since 'tabgives' was introduced.
In UTF-8 locales, the ranges A-F and a-f include several accented
characters beyond "ABCDEF" and "abcdef", such as the Croat č and ć.
This fixes https://savannah.gnu.org/bugs/?61487.
Bug existed since the beginning of each of the syntaxes,
for the C syntax since version 1.3.6, commit 159bdfdc.
Messages like "Search Wrapped" and "This is the only occurrence"
do not need to be shown until the next keystroke. Dropping them
quickly gives a better fullscreen experience.
When <Tab> at a prompt shows a list of filenames, this list should
not "sit" on the prompt bar but float one row above it.
This addresses the third issue mentioned in commit 03637030.
If there is a status-bar message and the cursor happens to be on the
bottom row of the screen (in hidden-interface mode), then scroll the
viewport one row down, to keep the cursor in view.
This addresses the second issue mentioned in commit 03637030.
(The issue was rereported in https://savannah.gnu.org/bugs/?61464.)
This needlessly wipes the status bar when --constantshow is active,
but it already needlessly wiped it when --minibar is active, so...
It is not a performance issue. It was just a small optimization.
(Plus, with --zero, nano does a full edit_refresh() when in fact
only the bottom row needs to be redrawn, but there is no easy way
to do that when --softwrap is active, so...)
(Using --constantshow with --zero doesn't make sense, but the user
might want to have the --constantshow when they toggle --zero off.)
This fixes https://savannah.gnu.org/bugs/?61460.
Bug existed since version 5.0, commit d3954901, since in the normal
version ^T was repurposed to give direct access to the Execute menu.
The --noread option should apply only to the files listed on the
command line, but once nano has started, it should be possible to
insert other files into the current buffer or into a new buffer.
This fixes https://savannah.gnu.org/bugs/?61458.
Bug existed since version 2.3.3, since --noread was introduced.
Before version 4.3, commit 3eab405e, nano would write a help text to
a temporary file and then read this file into a buffer. The NOREAD
flag interfered with the latter, so needed to be reset for showing
help. But since the mentioned commit nano writes a help text directly
into a buffer and the unsetting of the NOREAD flag is superfluous.
The display code never references the LINE_NUMBERS flag -- the trigger
for displaying line numbers in front of the text is 'margin > 0'. So,
since commit 90bd25c1 that put help texts into a "normal" buffer, the
unsetting of the LINE_NUMBERS flag has been superfluous.
As a special case, and because it doesn't need any feedback on the
status bar nor other calls, add a special function and key binding
to allow the user to flip the LINE_NUMBERS flag also in a tiny nano.
This fixes https://savannah.gnu.org/bugs/?61441.
Reported-by: Hannu Nyman <hannu.nyman@iki.fi>
When the terminal has just one row, there is no room to constantly show
the position of the cursor, so do not allow the user to switch it on.
This fixes https://savannah.gnu.org/bugs/?61445.
Bug existed since version 5.8, commit 36ffb5f0.
With --zero or 'set zero', nano will hide the title bar or the minibar
(whichever is active) and will use all rows of the terminal for showing
the text of the buffer. Only when there is an important message will
it be shown on the bottom row -- until the next keystroke.
This feature can be toggled with M-Z.
The feedback at startup ("Read nnn lines") is suppressed with --zero,
because it disrupts the fullscreen experience (and is hardly useful).
The "Reading..." message then needs to be suppressed too, otherwise
it creates an annoying little flash.
There are still some issues that need to be addressed:
* In the browser, when the highlighted item is on the bottom row, it
will get obscured by the prompt bar or the "Search Wrapped" message.
* In the edit window, when the search occurrence is on the bottom row,
it can get obscured by the "This is the only occurrence" message.
* When tabbing at a prompt shows possible completions, they are shown
a row too low.