commit 07289f437fca1320cb698cb569533db3b29c69ea
parent 99d155d80f87737e394caeebfde5e16b18350b92
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Thu, 2 May 2019 14:12:23 +0200
tweaks: invert a condition, in order to return earlier
Diffstat:
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/nano.c b/src/nano.c
@@ -1744,11 +1744,11 @@ void do_input(void)
#ifndef NANO_TINY
if (shortcut->func == do_toggle_void) {
do_toggle(shortcut->toggle);
- if (shortcut->toggle != CUT_FROM_CURSOR)
- retain_cuts = TRUE;
- } else
+ if (shortcut->toggle == CUT_FROM_CURSOR)
+ keep_cutbuffer = FALSE;
+ return;
+ }
#endif
- {
#ifndef NANO_TINY
linestruct *was_current = openfile->current;
size_t was_x = openfile->current_x;
@@ -1785,7 +1785,6 @@ void do_input(void)
if (!refresh_needed && (shortcut->func == do_delete ||
shortcut->func == do_backspace))
update_line(openfile->current, openfile->current_x);
- }
/* If we aren't cutting or copying text, and the key wasn't a toggle,
* blow away the text in the cutbuffer upon the next cutting action. */