nano

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

commit 8a06f70379851b00a04e665864dccd56f08819f4
parent 22901527431f8f8f4097b0cb47c41a34f0093dab
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Mon, 31 Jan 2022 12:09:45 +0100

tweaks: rename a function and reshuffle its call

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

diff --git a/src/prompt.c b/src/prompt.c @@ -158,7 +158,7 @@ void do_statusbar_backspace(void) } /* Zap the part of the answer after the cursor, or the whole answer. */ -void do_statusbar_cut_text(void) +void lop_the_answer(void) { if (answer[typing_x] == '\0') typing_x = 0; @@ -338,10 +338,10 @@ int do_statusbar_input(bool *finished) else if (ISSET(RESTRICTED) && currmenu == MWRITEFILE && openfile->filename[0] != '\0' && (shortcut->func == do_verbatim_input || - shortcut->func == cut_text || - shortcut->func == paste_text || shortcut->func == do_delete || - shortcut->func == do_backspace)) + shortcut->func == do_backspace || + shortcut->func == cut_text || + shortcut->func == paste_text)) ; #ifdef ENABLE_NANORC else if (shortcut->func == (functionptrtype)implant) @@ -349,12 +349,12 @@ int do_statusbar_input(bool *finished) #endif else if (shortcut->func == do_verbatim_input) do_statusbar_verbatim_input(); - else if (shortcut->func == cut_text) - do_statusbar_cut_text(); else if (shortcut->func == do_delete) do_statusbar_delete(); else if (shortcut->func == do_backspace) do_statusbar_backspace(); + else if (shortcut->func == cut_text) + lop_the_answer(); else if (shortcut->func == copy_text) copy_the_answer(); else if (shortcut->func == paste_text) {