nano

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

commit 8bf8682b17ca5d132ece0cfbac37c341d550a9c2
parent a9b5a0e0296b56f9a0d7de36390821761e5ec8d1
Author: Benno Schulenberg <bensberg@justemail.net>
Date:   Thu, 22 Dec 2016 12:13:03 +0100

binding: use the code for the Enter directly instead of a function call

And certainly don't return zero when the key wouldn't have been found,
because that would have meant jumping a word to the right.

Diffstat:
Msrc/browser.c | 2+-
Msrc/prompt.c | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/browser.c b/src/browser.c @@ -147,7 +147,7 @@ char *do_browser(char *path) /* If we selected the same filename as last time, fake a * press of the Enter key so that the file is read in. */ if (old_selected == selected) - unget_kbinput(the_code_for(do_enter, 0), FALSE); + unget_kbinput(KEY_ENTER, FALSE); } continue; diff --git a/src/prompt.c b/src/prompt.c @@ -148,7 +148,7 @@ int do_statusbar_input(bool *ran_func, bool *finished) * fake a press of Enter, and indicate that we're done. */ if (got_newline) { get_input(NULL, 1); - input = the_code_for(do_enter, 0); + input = KEY_ENTER; *finished = TRUE; } } else if (s->scfunc == do_cut_text_void)