nano

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

commit d1521c584d793931ec6b7ebe0884c77949a708c7
parent f52b6cf19f4f5c0f0aa3657a3742b5803decd366
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Mon, 30 Mar 2020 16:44:55 +0200

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

Diffstat:
Msrc/cut.c | 12++++++------
Msrc/files.c | 2+-
Msrc/proto.h | 2+-
Msrc/text.c | 4++--
4 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/cut.c b/src/cut.c @@ -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(); diff --git a/src/files.c b/src/files.c @@ -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); } diff --git a/src/proto.h b/src/proto.h @@ -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); diff --git a/src/text.c b/src/text.c @@ -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