nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 01457ae3d3194698300b2e28c65a7f20f318631d
parent c757aee235aa06395ea0a28c18a92d0c15b717fc
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Tue, 27 Feb 2018 11:11:02 +0100

input: handle the implant() function separately, as it is special

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.

Diffstat:
Msrc/nano.c | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/nano.c b/src/nano.c @@ -1727,6 +1727,12 @@ int do_input(bool allow_funcs) if (shortcut->func != complete_a_word) pletion_line = NULL; #endif +#ifdef ENABLE_NANORC + if (shortcut->func == implant) { + execute(shortcut); + return 42; + } +#endif #ifndef NANO_TINY if (shortcut->func == do_toggle_void) { do_toggle(shortcut->toggle);