From 01457ae3d3194698300b2e28c65a7f20f318631d Mon Sep 17 00:00:00 2001 From: Benno Schulenberg <bensberg@telfort.nl> Date: Tue, 27 Feb 2018 11:11:02 +0100 Subject: [PATCH] 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. --- src/nano.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/nano.c b/src/nano.c index 3a413fa6..fcb0c1ba 100644 --- 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); -- GitLab