mirror of git://git.sv.gnu.org/nano.git
tweaks: elide a now-unused parameter -- it is always FALSE
This commit is contained in:
parent
f52b6cf19f
commit
d1521c584d
12
src/cut.c
12
src/cut.c
|
@ -209,7 +209,7 @@ void chop_word(bool forward)
|
||||||
|
|
||||||
/* Now kill the marked region and a word is gone. */
|
/* Now kill the marked region and a word is gone. */
|
||||||
add_undo(CUT, NULL);
|
add_undo(CUT, NULL);
|
||||||
do_snip(FALSE, TRUE, FALSE, FALSE);
|
do_snip(TRUE, FALSE, FALSE);
|
||||||
update_undo(CUT);
|
update_undo(CUT);
|
||||||
|
|
||||||
/* Discard the cut word and restore the cutbuffer. */
|
/* 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
|
* If until_eof is TRUE, move all text from the current cursor
|
||||||
* position to the end of the file into the cutbuffer. If append
|
* position to the end of the file into the cutbuffer. If append
|
||||||
* is TRUE (when zapping), always append the cut to the cutbuffer. */
|
* 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 cuts were not continuous, or when cutting a region, clear the slate. */
|
||||||
if ((!keep_cutbuffer || marked || until_eof ||
|
if ((!keep_cutbuffer || marked || until_eof ||
|
||||||
|
@ -496,12 +496,12 @@ void cut_text(void)
|
||||||
add_undo(CUT, NULL);
|
add_undo(CUT, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
do_snip(FALSE, openfile->mark != NULL, FALSE, FALSE);
|
do_snip(openfile->mark != NULL, FALSE, FALSE);
|
||||||
|
|
||||||
update_undo(CUT);
|
update_undo(CUT);
|
||||||
#else
|
#else
|
||||||
if (is_cuttable(FALSE))
|
if (is_cuttable(FALSE))
|
||||||
do_snip(FALSE, FALSE, FALSE, FALSE);
|
do_snip(FALSE, FALSE, FALSE);
|
||||||
#endif
|
#endif
|
||||||
wipe_statusbar();
|
wipe_statusbar();
|
||||||
}
|
}
|
||||||
|
@ -621,7 +621,7 @@ void cut_till_eof(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
add_undo(CUT_TO_EOF, NULL);
|
add_undo(CUT_TO_EOF, NULL);
|
||||||
do_snip(FALSE, FALSE, TRUE, FALSE);
|
do_snip(FALSE, TRUE, FALSE);
|
||||||
update_undo(CUT_TO_EOF);
|
update_undo(CUT_TO_EOF);
|
||||||
wipe_statusbar();
|
wipe_statusbar();
|
||||||
}
|
}
|
||||||
|
@ -643,7 +643,7 @@ void zap_text(void)
|
||||||
/* Use the cutbuffer from the ZAP undo item, so the cut can be undone. */
|
/* Use the cutbuffer from the ZAP undo item, so the cut can be undone. */
|
||||||
cutbuffer = openfile->current_undo->cutbuffer;
|
cutbuffer = openfile->current_undo->cutbuffer;
|
||||||
|
|
||||||
do_snip(FALSE, openfile->mark != NULL, FALSE, TRUE);
|
do_snip(openfile->mark != NULL, FALSE, TRUE);
|
||||||
|
|
||||||
update_undo(ZAP);
|
update_undo(ZAP);
|
||||||
wipe_statusbar();
|
wipe_statusbar();
|
||||||
|
|
|
@ -1057,7 +1057,7 @@ bool execute_command(const char *command)
|
||||||
openfile->current_x = 0;
|
openfile->current_x = 0;
|
||||||
}
|
}
|
||||||
add_undo(CUT, NULL);
|
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);
|
update_undo(CUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -263,7 +263,7 @@ void copy_from_buffer(linestruct *somebuffer);
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
void cut_marked_region(void);
|
void cut_marked_region(void);
|
||||||
#endif
|
#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);
|
void cut_text(void);
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
void copy_marked_region(void);
|
void copy_marked_region(void);
|
||||||
|
|
|
@ -491,7 +491,7 @@ void redo_cut(undostruct *u)
|
||||||
|
|
||||||
goto_line_posx(u->tail_lineno, u->tail_x);
|
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);
|
free_lines(cutbuffer);
|
||||||
cutbuffer = oldcutbuffer;
|
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. */
|
/* Cut either the marked region or the whole buffer. */
|
||||||
add_undo(action, NULL);
|
add_undo(action, NULL);
|
||||||
#endif
|
#endif
|
||||||
do_snip(FALSE, openfile->mark, openfile->mark == NULL, FALSE);
|
do_snip(openfile->mark != NULL, openfile->mark == NULL, FALSE);
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
update_undo(action);
|
update_undo(action);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue