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.
master
Benno Schulenberg 2018-02-27 11:11:02 +01:00
parent c757aee235
commit 01457ae3d3
1 changed files with 6 additions and 0 deletions

View File

@ -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);