Don't make it the responsibility of the executed functions to restore
the list of shortcuts of the edit window. Just detect whether another
menu was displayed, and if so, redisplay the main menu.
The way to update nano.pot is to run 'make nano.pot-update' in the po
subdir. Updating a specific PO file is then done with 'make xx.po'.
(The script mistakenly included all leading comments, not just the
ones marked with "TRANSLATORS:".)
It sounded like an instigation to upgrade, or like a list of
instructions on how to upgrade. But it is merely a list of
noteworthy changes -- what other packages put in the NEWS file.
To add a character, one does not need to allocate twice its size.
And the amount to be moved does not depend on the size of the new
character; it just needs to include the terminating zero.
(This fixes in do_output() the same logical mistakes that were fixed
in do_statusbar_output() last February, in acf19bd and 7c0e433.)
Specifying an operating directory should either lead to a successfull
confinement, or nano should fail to start.
(Also: save the terminal settings as soon as possible, so that an early
die() will not restore uninitialized values.)
This fixes the first part of https://savannah.gnu.org/bugs/?47798 properly.
This fixes https://savannah.gnu.org/bugs/?48103.
(The fix is wasteful -- it should only discard the multidata if actually
the name *did* change, *and* if the applicable syntax changed.)
By moving the test for the only situation where do_comment() does nothing
(when only the magic line is selected) further up front, the add_undo()
can be called before the commenting/uncommenting starts and two variables
and an extra function are made unnecessary.
That is: don't mix the number of lines read with a warning about the
file being unwritable -- the former is just convenience information,
the latter is a must-see.
This fixes https://savannah.gnu.org/bugs/?48047.
When running in a non-UTF locale, and when strncasecmp() suffers from
the same defect as strncmp(), make sure not to pass a length with the
high bit set.
This reverts commit df8c3de from six years ago, which prevented a crash
on the Armel/Maemo platforms but causes nano to lose history items.
The strncmp() function on those platforms treats size_t numbers with
the high bit set as if they were zero. To avoid that, use a number
that cannot be seen as negative, as suggested by <alpha@qzx.com>.
This fixes https://savannah.gnu.org/bugs/?48048.
Tested-by: Tito Ragusa <farmatito@tiscali.it>
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Store the file sizes from before and after the commenting/uncommenting
in the undo struct, so they can be restored when undoing or redoing.
This fixes https://savannah.gnu.org/bugs/?48062.
Signed-off-by: Mike Scalora <mike@scalora.org>