tweaks: elide a now-unused parameter -- it is always FALSE

This commit is contained in:
Benno Schulenberg 2020-03-30 16:44:55 +02:00
parent f52b6cf19f
commit d1521c584d
4 changed files with 10 additions and 10 deletions

View File

@ -209,7 +209,7 @@ void chop_word(bool forward)
/* Now kill the marked region and a word is gone. */
add_undo(CUT, NULL);
do_snip(FALSE, TRUE, FALSE, FALSE);
do_snip(TRUE, FALSE, FALSE);
update_undo(CUT);
/* Discard the cut word and restore the cutbuffer. */
@ -453,7 +453,7 @@ void cut_to_eof(void)
* If until_eof is TRUE, move all text from the current cursor
* position to the end of the file into the cutbuffer. If append
* is TRUE (when zapping), always append the cut to the cutbuffer. */
void do_snip(bool copying, bool marked, bool until_eof, bool append)
void do_snip(bool marked, bool until_eof, bool append)
{
/* If cuts were not continuous, or when cutting a region, clear the slate. */
if ((!keep_cutbuffer || marked || until_eof ||
@ -496,12 +496,12 @@ void cut_text(void)
add_undo(CUT, NULL);
}
do_snip(FALSE, openfile->mark != NULL, FALSE, FALSE);
do_snip(openfile->mark != NULL, FALSE, FALSE);
update_undo(CUT);
#else
if (is_cuttable(FALSE))
do_snip(FALSE, FALSE, FALSE, FALSE);
do_snip(FALSE, FALSE, FALSE);
#endif
wipe_statusbar();
}
@ -621,7 +621,7 @@ void cut_till_eof(void)
}
add_undo(CUT_TO_EOF, NULL);
do_snip(FALSE, FALSE, TRUE, FALSE);
do_snip(FALSE, TRUE, FALSE);
update_undo(CUT_TO_EOF);
wipe_statusbar();
}
@ -643,7 +643,7 @@ void zap_text(void)
/* Use the cutbuffer from the ZAP undo item, so the cut can be undone. */
cutbuffer = openfile->current_undo->cutbuffer;
do_snip(FALSE, openfile->mark != NULL, FALSE, TRUE);
do_snip(openfile->mark != NULL, FALSE, TRUE);
update_undo(ZAP);
wipe_statusbar();

View File

@ -1057,7 +1057,7 @@ bool execute_command(const char *command)
openfile->current_x = 0;
}
add_undo(CUT, NULL);
do_snip(FALSE, openfile->mark != NULL, openfile->mark == NULL, FALSE);
do_snip(openfile->mark != NULL, openfile->mark == NULL, FALSE);
update_undo(CUT);
}

View File

@ -263,7 +263,7 @@ void copy_from_buffer(linestruct *somebuffer);
#ifndef NANO_TINY
void cut_marked_region(void);
#endif
void do_snip(bool copying, bool marked, bool until_eof, bool append);
void do_snip(bool marked, bool until_eof, bool append);
void cut_text(void);
#ifndef NANO_TINY
void copy_marked_region(void);

View File

@ -491,7 +491,7 @@ void redo_cut(undostruct *u)
goto_line_posx(u->tail_lineno, u->tail_x);
do_snip(FALSE, TRUE, FALSE, u->type == ZAP);
do_snip(TRUE, FALSE, u->type == ZAP);
free_lines(cutbuffer);
cutbuffer = oldcutbuffer;
@ -2320,7 +2320,7 @@ bool replace_buffer(const char *filename, undo_type action, const char *operatio
/* Cut either the marked region or the whole buffer. */
add_undo(action, NULL);
#endif
do_snip(FALSE, openfile->mark, openfile->mark == NULL, FALSE);
do_snip(openfile->mark != NULL, openfile->mark == NULL, FALSE);
#ifndef NANO_TINY
update_undo(action);
#endif