Renaming '*cut_till_end' to '*cut_till_eof', to reduce
confusion with CUT_TO_END, which is about end-of-line. Patch by Mark Majeres. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5041 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
776931a0b0
commit
95e77a9d5f
|
@ -1,3 +1,8 @@
|
|||
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
|
||||
|
|
12
src/cut.c
12
src/cut.c
|
@ -120,11 +120,11 @@ void cut_to_eof(void)
|
|||
|
||||
/* 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
|
||||
|
@ -173,8 +173,8 @@ void do_cut_text(
|
|||
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) {
|
||||
|
@ -215,7 +215,7 @@ void do_cut_text(
|
|||
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. */
|
||||
|
@ -268,7 +268,7 @@ void do_copy_text(void)
|
|||
}
|
||||
|
||||
/* 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);
|
||||
|
|
10
src/global.c
10
src/global.c
|
@ -578,7 +578,7 @@ void shortcut_init(void)
|
|||
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
|
||||
|
@ -876,8 +876,8 @@ void shortcut_init(void)
|
|||
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
|
||||
|
@ -1069,7 +1069,7 @@ void shortcut_init(void)
|
|||
#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
|
||||
|
@ -1283,7 +1283,7 @@ sc *strtosc(char *input)
|
|||
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"))
|
||||
|
|
|
@ -1690,7 +1690,7 @@ int do_input(bool allow_funcs)
|
|||
* 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;
|
||||
|
|
|
@ -259,7 +259,7 @@ void cut_to_eof(void);
|
|||
#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
|
||||
|
@ -267,7 +267,7 @@ void do_cut_text(
|
|||
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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue