tweaks: invert a condition, in order to return earlier

master
Benno Schulenberg 2019-05-02 14:12:23 +02:00
parent 99d155d80f
commit 07289f437f
1 changed files with 4 additions and 5 deletions

View File

@ -1744,11 +1744,11 @@ void do_input(void)
#ifndef NANO_TINY #ifndef NANO_TINY
if (shortcut->func == do_toggle_void) { if (shortcut->func == do_toggle_void) {
do_toggle(shortcut->toggle); do_toggle(shortcut->toggle);
if (shortcut->toggle != CUT_FROM_CURSOR) if (shortcut->toggle == CUT_FROM_CURSOR)
retain_cuts = TRUE; keep_cutbuffer = FALSE;
} else return;
}
#endif #endif
{
#ifndef NANO_TINY #ifndef NANO_TINY
linestruct *was_current = openfile->current; linestruct *was_current = openfile->current;
size_t was_x = openfile->current_x; size_t was_x = openfile->current_x;
@ -1785,7 +1785,6 @@ void do_input(void)
if (!refresh_needed && (shortcut->func == do_delete || if (!refresh_needed && (shortcut->func == do_delete ||
shortcut->func == do_backspace)) shortcut->func == do_backspace))
update_line(openfile->current, openfile->current_x); update_line(openfile->current, openfile->current_x);
}
/* If we aren't cutting or copying text, and the key wasn't a toggle, /* 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. */ * blow away the text in the cutbuffer upon the next cutting action. */