As version 0.20 of `autopoint` no longer overwrites 'extern-inline.m4',
there is no need any more for the custom calls of the various parts of
`autoreconf`.
This effectively reverts commit 4a1db96d from two and a half years ago.
Gettext-0.20 is the first version where its `autopoint` does not
overwrite the newer 'extern-inline.m4' from gnulib.
Version 0.20 is five years old, so most users will be on a distro
that includes that version of gettext or a newer one.
Also, reshuffle Alt+T for balance, slightly reword the description
of Alt+A (as it differs in nature from the other toggles), and add
some spaces for better alignment.
Something similar can be achieved with:
bind ^T "{center}{bottomrow}{center}{toprow}" main
bind ^B "{center}{toprow}{center}{bottomrow}" main
But that requires allocating two extra shortcuts, and it works right only
when the edit window has an odd number of rows, not with an even number.
Also, this new ^L behavior is available by default, out-of-the-box.
On the first call, `cycle` centers the line with the cursor, on the
second consecutive call it pushes that line to the top of the viewport,
and on the third consecutive call to the bottom of the viewport.
The function do_tab() is only ever called when in the main edit window,
and never called while a bracketed paste is in progress.
(The two conditions were thoughtlessly copied when this fragment of code
was moved here three commits ago.)
When softwrapping with a tabsize larger than the width of the viewport,
scrolling one row when the cursor goes offscreen might not be enough,
so in that case use edit_redraw() instead.
This fixes https://savannah.gnu.org/bugs/?65860.
Bug existed since version 2.9.6, commit 0d9080a2.
This allows a {tab} in a string bind to indent a marked region.
This fixes https://savannah.gnu.org/bugs/?65859.
Problem existed since version 7.0, since braced function names
were introduced.
Activating --modernbindings when the binary's name starts with "e"
interferes with Debian's alternatives system that symlinks `editor`
to `nano` in a default install.
(Also: why "e"? It would have made more sense to check for "m",
similar to the checking for "r" for a restricted nano.)
This reverts commit 580eaf29 from fifteen months ago.
This addresses https://savannah.gnu.org/bugs/?65810.
Reported-by: Colin Snover <nano@zetafleet.com>
The names of the authors were retrieved from:
git log -p --follow syntax/<name>.nanorc
and from:
git log -p --follow --all -- doc/nanorc.sample
For some files the original author is unclear, or
the file is/was too small to mention an author for.
The typo prevented several keywords from getting colorized.
This addresses https://savannah.gnu.org/patch/?10459.
Bug existed since version 2.1.6, commit 513157df,
since the Fortran syntax was introduced.
The succinct function descriptions in the help lines are not shown in
reverse video by default, so they are not bolded by -D/--bold either.
Also, mention 'promptcolor' and 'minicolor' where they were missing.
Prevent also the toggling of Append and Prepend. All four functions
should not be available in restricted mode, and are absent from the
WriteOut menu in that mode, but using {browser}, {backup}, {append}
or {prepend} in a string bind allowed to bypass the menu checks.
This fixes https://savannah.gnu.org/bugs/?65819.
Problem existed since version 7.0, since braced function names
were introduced.
Since version 3.2, commit 5ca444e5, nano reads the nanorc files also
in restricted mode (when not also --ignorercfiles is given), meaning
that syntaxes are available and that a specific syntax can be selected
on the command line. So, the --help output in restricted mode should
list the relevant option: -Y<name> / --syntax=<name>.
(This should have been part of commit b81995af from six years ago.)
The bindable function 'nowrap' has been deprecated for three years,
since version 5.5, commit e14127b8.
(The obsolete options --nowrap and 'set nowrap' continue to exist.)
When one has installed additional syntaxes, one tends to forget
what exactly is there. So it's nice to be able to list them.
The syntaxes are listed in the reverse order in which they were
read: the most recent first.
The long form of the option is, of course, --listsyntaxes,
which can be abbreviated to --list.
This fulfills https://savannah.gnu.org/bugs/?65779.
The feature was suggested by `davidhcefx`.
Stop doing colon parsing by default, to avoid surprises and frustration
for users that have filenames that end in a colon plus digits.
The equivalent rcfile option is, of course, 'set colonparsing'.
Using +1, or similar, before the filename disables any colon parsing
and the filename is taken as is.
Starting from the end of the provided filename avoids needlessly looking
at colons that are somewhere in the middle of the path or the filename.
It also avoids inconsistenly interpreting a specified line number as a
column number when the filename itself ends with a colon plus digits
and the filename without the colon plus digits exists too.
This also removes the eliding of a backslash before a colon, which
would mangle the filename if the name actually contained a backslash
followed by a colon.
Negative line and column numbers are no longer allowed when using the
colon notation.
This fixes https://savannah.gnu.org/bugs/?65781,
and fixes https://savannah.gnu.org/bugs/?65782.
Problems existed since version 8.0, since colon parsing was introduced.
While updating the screen, ncurses by default polls the input source
now and then to see if there is new input, and if so, stops updating
the screen and waits for the next call of doupdate() or refresh().
https://lists.gnu.org/archive/html/bug-ncurses/2024-05/msg00077.html
Disable this polling, as it is just a waste of time, and there *might*
be situations where the intruding keystroke does not actually trigger
a new update, which could result in a half-updated screen.
When the file 'foo:24' exists (but not 'foo') and the user wants to
use the colon notation to place the cursor on a certain line, then
nano would first interpret the given line number as a column number,
before noticing that 'foo' does not exist and then skipping the first
colon. So, when such a misinterpretation occurs, the column number
needs to be reset to zero.
When the user specifies, on the command line, a filename that ends with
a colon plus digits, and that filename exists in the file system, then
open that file, instead of interpreting the digits as a line number.
Also, if the filename stripped of the colon plus digits does not exist,
then do not interpret the digits as a line number either but treat them
as part of the file name.
Before this change, the user would have to escape the colon whenever
they wanted to open a file whose name ended with a colon plus digits.
Now the user needs to escape the colon only when 'foo' exists and they
want to create, say, 'foo:24'.
Problem-was-reported-by: Ralph Corderoy <ralph@inputplus.co.uk>
https://lists.gnu.org/archive/html/nano-devel/2024-05/msg00001.html
Mitigation-was-suggested-by: Mike Scalora <mike@scalora.org>
https://lists.gnu.org/archive/html/nano-devel/2024-05/msg00008.html