tweaks: adjust some whitespace, reshuffle two ifs, and remove two braces

master
Benno Schulenberg 2020-02-17 11:29:13 +01:00
parent a9f7277b1b
commit 5c07a747bb
3 changed files with 5 additions and 7 deletions

View File

@ -132,7 +132,7 @@ void do_backspace(void)
zap_text(); zap_text();
else else
#endif #endif
if (openfile->current != openfile->filetop || openfile->current_x > 0) { if (openfile->current_x > 0 || openfile->current != openfile->filetop) {
do_left(); do_left();
do_deletion(BACK); do_deletion(BACK);
} }

View File

@ -1734,7 +1734,6 @@ void inject(char *burst, size_t count)
if (!refresh_needed) if (!refresh_needed)
check_the_multis(openfile->current); check_the_multis(openfile->current);
#endif #endif
if (!refresh_needed) if (!refresh_needed)
update_line(openfile->current, openfile->current_x); update_line(openfile->current, openfile->current_x);
} }

View File

@ -1062,10 +1062,9 @@ bool execute_command(const char *command)
else else
read_file(stream, 0, "pipe", TRUE); read_file(stream, 0, "pipe", TRUE);
if (should_pipe && !ISSET(MULTIBUFFER)) { if (should_pipe && !ISSET(MULTIBUFFER))
/* TRANSLATORS: The next two go with Undid/Redid messages. */ /* TRANSLATORS: The next two go with Undid/Redid messages. */
add_undo(COUPLE_END, N_("filtering")); add_undo(COUPLE_END, N_("filtering"));
}
/* Wait for the external command (and possibly data sender) to terminate. */ /* Wait for the external command (and possibly data sender) to terminate. */
wait(NULL); wait(NULL);
@ -1223,10 +1222,10 @@ void add_undo(undo_type action, const char *message)
} }
break; break;
case PASTE: case PASTE:
if (openfile->current == openfile->filebot)
u->xflags |= WAS_FINAL_LINE;
u->cutbuffer = copy_buffer(cutbuffer); u->cutbuffer = copy_buffer(cutbuffer);
u->lineno += cutbottom->lineno - cutbuffer->lineno; u->lineno += cutbottom->lineno - cutbuffer->lineno;
if (openfile->current == openfile->filebot)
u->xflags |= WAS_FINAL_LINE;
break; break;
case INSERT: case INSERT:
if (openfile->current == openfile->filebot) if (openfile->current == openfile->filebot)