+2014-06-30 Mark Majeres <mark@engine12.com>
+ * src/cut.c, src/global.c, src/nano.c: Rename 'cut_till_end' to
+ 'cut_till_eof', and 'do_cut_till_end' to 'do_cut_till_eof', to
+ reduce confusion with CUT_TO_END, which is about end-of-line.
+
2014-06-30 Benno Schulenberg <bensberg@justemail.net>
* src/color.c (color_update): When there are no syntaxes, for example
with --ignorercfiles, do not try to find one, because that would lead
/* Move text from the current filestruct into the cutbuffer. If
* copy_text is TRUE, copy the text back into the filestruct afterward.
- * If cut_till_end is TRUE, move all text from the current cursor
+ * If cut_till_eof is TRUE, move all text from the current cursor
* position to the end of the file into the cutbuffer. */
void do_cut_text(
#ifndef NANO_TINY
- bool copy_text, bool cut_till_end, bool undoing
+ bool copy_text, bool cut_till_eof, bool undoing
#else
void
#endif
keep_cutbuffer = TRUE;
#ifndef NANO_TINY
- if (cut_till_end) {
- /* If cut_till_end is TRUE, move all text up to the end of the
+ if (cut_till_eof) {
+ /* If cut_till_eof is TRUE, move all text up to the end of the
* file into the cutbuffer. */
cut_to_eof();
} else if (openfile->mark_set) {
if (!old_no_newlines)
UNSET(NO_NEWLINES);
} else if (!undoing)
- update_undo(cut_till_end ? CUT_EOF : CUT);
+ update_undo(cut_till_eof ? CUT_EOF : CUT);
/* Leave the text in the cutbuffer, and mark the file as
* modified. */
}
/* Cut from the current cursor position to the end of the file. */
-void do_cut_till_end(void)
+void do_cut_till_eof(void)
{
add_undo(CUT_EOF);
do_cut_text(FALSE, TRUE, FALSE);
const char *nano_backspace_msg =
N_("Delete the character to the left of the cursor");
#ifndef NANO_TINY
- const char *nano_cut_till_end_msg =
+ const char *nano_cut_till_eof_msg =
N_("Cut from the cursor position to the end of the file");
#endif
#ifndef DISABLE_JUSTIFY
NOVIEW);
#ifndef NANO_TINY
- add_to_funcs(do_cut_till_end, MMAIN,
- N_("CutTillEnd"), IFSCHELP(nano_cut_till_end_msg), TRUE, NOVIEW);
+ add_to_funcs(do_cut_till_eof, MMAIN,
+ N_("CutTillEnd"), IFSCHELP(nano_cut_till_eof_msg), TRUE, NOVIEW);
#endif
#ifndef DISABLE_JUSTIFY
#endif
add_to_sclist(MMOST, "M-V", do_verbatim_input, 0);
#ifndef NANO_TINY
- add_to_sclist(MMAIN, "M-T", do_cut_till_end, 0);
+ add_to_sclist(MMAIN, "M-T", do_cut_till_eof, 0);
add_to_sclist(MMAIN, "M-D", do_wordlinechar_count, 0);
#endif
#ifndef DISABLE_JUSTIFY
s->scfunc = do_uncut_text;
#ifndef NANO_TINY
else if (!strcasecmp(input, "cutrestoffile"))
- s->scfunc = do_cut_till_end;
+ s->scfunc = do_cut_till_eof;
else if (!strcasecmp(input, "copytext"))
s->scfunc = do_copy_text;
else if (!strcasecmp(input, "mark"))
* cutting or copying text, remember this. */
if (s->scfunc == do_cut_text_void
#ifndef NANO_TINY
- || s->scfunc == do_copy_text || s->scfunc == do_cut_till_end
+ || s->scfunc == do_copy_text || s->scfunc == do_cut_till_eof
#endif
)
preserve = TRUE;
#endif
void do_cut_text(
#ifndef NANO_TINY
- bool copy_text, bool cut_till_end, bool undoing
+ bool copy_text, bool cut_till_eof, bool undoing
#else
void
#endif
void do_cut_text_void(void);
#ifndef NANO_TINY
void do_copy_text(void);
-void do_cut_till_end(void);
+void do_cut_till_eof(void);
#endif
void do_uncut_text(void);