When 'afterends' is set and Ctrl+Right or Shift+Ctrl+Right is pressed,
nano will stop at the ends of words instead of their beginnings.
Signed-off-by: Mark-Weston <markweston@cock.li>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
Upon a segmentation fault or an abort signal, instead of crashing,
losing all changes, and leaving the terminal in curses mode, nano
now calls die(), to save any changed buffers and to restore the
terminal to a usable state.
For the remote chance that nano segfaults in die(), the handler for
SIGSEGV and for SIGABRT is reset to its default value as soon as the
signal fires, to prevent a crash-handler loop.
Since a core dump is usually more helpful for debugging, the crash
handler is not included in a debug build.
This addresses https://savannah.gnu.org/patch/?9623.
Signed-off-by: Devin Hussey <husseydevin@gmail.com>
Also, add a period after the "Read nn lines" message, and
don't let the next shell prompt overwrite this message.
This addresses https://savannah.gnu.org/bugs/?53779.
In the preceding commit, open_buffer() was changed so that it gets
told whether to load into a new buffer or not, so it is no longer
needed to convey this information through a flag.
This fixes a regression introduced by commit 54103d8e: a crash that
can be triggered by running 'nano --restrict' and pressing <Insert>.
This addresses https://bugzilla.redhat.com/1558532.
As, since commit 0e30177d, the scrollup and scrolldown commands
no longer intend to move the cursor, they should not be seen as
movement functions.
Also, it is not guaranteed that functions are ordered in the same
way in the binary as in the source code, so an ordered comparison
of function pointers will not always work.
This fixes https://savannah.gnu.org/bugs/?53333.
This assumes that all movement functions are located together,
starting with to_first_line() and ending with do_right().
This fixes https://savannah.gnu.org/bugs/?53195.
Reported-by: Brand Huntsman <alpha@qzx.com>
The implant() function itself cannot be bound to anything, so it
is not in the linked list of functions -- trying to find it would
lead to a NULL pointer, and thus to a segfault.
This fixes https://savannah.gnu.org/bugs/?53233.
Instead of always calling sctofunc(), it is now only called when
in view mode OR when (after the keystroke's function has been run)
no need for a refresh has been established yet.
When 'refresh_needed' is already TRUE, there is no need any more
to check whether it should be set.
[Those first two calls are leftovers from before the time that
reset_multis() morphed into check_the_multis().]
When characters are added via Verbatim Input or by pressing <Tab>,
the prepend flag should be retained, just like when characters are
typed directly.
This fixes https://savannah.gnu.org/bugs/?52956.
In this way a single keystroke can produce a fragment of text or a
series of commands, or a mix of the two. It is like a prerecorded
macro.
This fulfills https://savannah.gnu.org/bugs/?52931.