If the user really wants to match anything, ".*" should be used.
(This also stops nano looking at the rest of the line as soon as an
empty regular expression is encountered. This may seem like poorer
feedback than before, but... I think that multiple error messages
per line are more confusing than helpful.)
This fixes https://savannah.gnu.org/bugs/?57942.
Bug existed since before version 2.2.0.
When copy-pasting has resulted in a nanorc file with DOS line endings
(CR+LF), then silently ignore the carriage return, to avoid printing
an error message that partly overwrites itself.
This fulfills https://savannah.gnu.org/bugs/?57756.
Requested-by: Matthias Aßhauer <mha1993@live.de>
A control code cannot be a Meta keystroke, and a plain printable
character as key code necessarily means it is a Meta keystroke.
So, comparing just the key code is enough.
Some key strings map to the same key code, so to unbind also a string's
synonyms, go through the list comparing against the key code. It has
the additional advantage that it is faster: a plain value comparison
instead of a string comparison.
There is no need to compare also the meta flag, because plain printable
ASCII characters (from 0x20 to 0x7E) cannot be shortcuts, so when such
a character matches, it necessarily means it is a meta keystroke.
This fixes https://savannah.gnu.org/bugs/?57397.
When assign_keyinfo() gets passed zero as key code, it will call
keycode_from_string() to determine the key code from the string.
So, remember the key code when keycode_from_string() gets called
the first time to avoid the second call.
For symmetry with the help viewer.
Even though the user could still exit with the bare Q, E, or X keys,
these are not listed in the help text, so they don't really count.
As was noted two months ago: nowhere in the manual does it say that
keywords are case-insensitive, and the manual shows all keywords in
lowercase, and all the examples are in lowercase too. So... simply
expect keywords to be in all lowercase.
Also for the "universal" functions (like cursor movement) and the
special 'implant' function, the 'all' keyword should include the
browser menu.
This fully fixes https://savannah.gnu.org/bugs/?57280.
Bug existed since version 3.2, commit cc01bc3e.
The word "fixer" sounds too much as if the command would be able
to fix mistakes or correct errors. Especially when seen next to
"linter", it sounds as if one does a syntax check and the other
fixes the found mistakes. (Although the command might in theory
be used for this, it is not its intended purpose.)
Do not wait for the user to press a key when there is some problem
with any of the history files. Just start and indicate the problem
on the status bar. The precise error message is stored and will be
shown on the terminal when exiting from nano.
This addresses https://savannah.gnu.org/bugs/?56524.
The command can be used to run some kind of formatter or corrector or
arranging tool on the buffer. By default the command is bound to M-F.
The formatter/corrector/arranging program must be non-interactive.
This addresses https://savannah.gnu.org/bugs/?55365,
and addresses https://savannah.gnu.org/bugs/?54651.
When 'extendsyntax' is used with a 'header' or 'magic' command, it
must be processed immediately. It is pointless to store the command,
because when then it is processed (when the syntax gets used), it is
too late to have any effect.
This fixes https://savannah.gnu.org/bugs/?56997.
With-help-from: Brand Huntsman <alpha@qzx.com>
Bug existed since version 4.3, commit cba9d8d0.