commit f74a1208034bf05b67d14b0648a013f51deecf9a
parent 911eb0cf2a5809c31f0249d0f6e5dbb5e1e53078
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Sun, 6 Jan 2019 15:35:31 +0100
tweaks: refer to the magic line as "magic line", not as "magicline"
Diffstat:
6 files changed, 12 insertions(+), 14 deletions(-)
diff --git a/src/cut.c b/src/cut.c
@@ -309,7 +309,7 @@ void do_cut_text(bool copy_text, bool marked, bool cut_till_eof, bool append)
cb_save = cutbottom;
cb_save_len = strlen(cutbottom->data);
}
- /* Don't add a magicline when moving text to the cutbuffer. */
+ /* Don't add a magic line when moving text to the cutbuffer. */
SET(NO_NEWLINES);
}
@@ -346,7 +346,7 @@ void do_cut_text(bool copy_text, bool marked, bool cut_till_eof, bool append)
if (right_side_up)
openfile->placewewant = xplustabs();
}
- /* Restore the magicline behavior now that we're done fiddling. */
+ /* Restore the magic-line behavior now that we're done fiddling. */
if (!old_no_newlines)
UNSET(NO_NEWLINES);
} else
diff --git a/src/files.c b/src/files.c
@@ -565,7 +565,7 @@ void replace_marked_buffer(const char *filename)
if (descriptor < 0)
return;
- /* Don't add a magicline when replacing text in the buffer. */
+ /* Don't add a magic line when replacing text in the buffer. */
SET(NO_NEWLINES);
add_undo(COUPLE_BEGIN);
@@ -582,7 +582,7 @@ void replace_marked_buffer(const char *filename)
/* Insert the processed file where the marked text was. */
read_file(f, descriptor, filename, TRUE);
- /* Restore the magicline behavior now that we're done fiddling. */
+ /* Restore the magic-line behavior now that we're done fiddling. */
if (!old_no_newlines)
UNSET(NO_NEWLINES);
@@ -2049,7 +2049,6 @@ bool write_marked_file(const char *name, FILE *f_open, bool tmp,
{
bool retval;
bool added_magicline = FALSE;
- /* Whether we added a magicline after filebot. */
filestruct *top, *bot;
size_t top_x, bot_x;
@@ -2058,7 +2057,7 @@ bool write_marked_file(const char *name, FILE *f_open, bool tmp,
(const filestruct **)&bot, &bot_x, NULL);
filepart = partition_filestruct(top, top_x, bot, bot_x);
- /* If we are doing magicline, and the last line of the partition
+ /* If we are using a magic line, and the last line of the partition
* isn't blank, then add a newline at the end of the buffer. */
if (!ISSET(NO_NEWLINES) && openfile->filebot->data[0] != '\0') {
new_magicline();
@@ -2067,7 +2066,6 @@ bool write_marked_file(const char *name, FILE *f_open, bool tmp,
retval = write_file(name, f_open, tmp, method, FALSE);
- /* If we added a magicline, remove it now. */
if (added_magicline)
remove_magicline();
diff --git a/src/nano.c b/src/nano.c
@@ -392,7 +392,7 @@ void extract_buffer(filestruct **file_top, filestruct **file_bot,
/* Renumber, starting with the beginning line of the old partition. */
renumber(top_save);
- /* If the text doesn't end with a magicline, and it should, add one. */
+ /* If the text doesn't end with a newline, and it should, add one. */
if (!ISSET(NO_NEWLINES) && openfile->filebot->data[0] != '\0')
new_magicline();
}
@@ -489,7 +489,7 @@ void ingraft_buffer(filestruct *somebuffer)
/* Renumber, starting with the beginning line of the old partition. */
renumber(top_save);
- /* If the text doesn't end with a magicline, and it should, add one. */
+ /* If the text doesn't end with a newline, and it should, add one. */
if (!ISSET(NO_NEWLINES) && openfile->filebot->data[0] != '\0')
new_magicline();
}
@@ -1902,7 +1902,7 @@ void do_output(char *output, size_t output_len, bool allow_cntrls)
update_undo(ADD);
#endif
- /* If we've added text to the magicline, create a new magicline. */
+ /* If we've added text to the magic line, create a new magic line. */
if (openfile->filebot == openfile->current && !ISSET(NO_NEWLINES)) {
new_magicline();
if (margin > 0)
diff --git a/src/search.c b/src/search.c
@@ -680,7 +680,7 @@ ssize_t do_replace_loop(const char *needle, bool whole_word_only,
#endif
/* If "automatic newline" is enabled, and text has been added to the
- * magicline, make a new magicline. */
+ * magic line, make a new magic line. */
if (!ISSET(NO_NEWLINES) && openfile->filebot->data[0] != '\0')
new_magicline();
diff --git a/src/text.c b/src/text.c
@@ -479,7 +479,7 @@ void undo_cut(undo *u)
copy_from_buffer(u->cutbuffer);
- /* If the final line was originally cut, remove the extra magicline. */
+ /* If the final line was originally cut, remove the extra magic line. */
if ((u->xflags & WAS_FINAL_LINE) && !ISSET(NO_NEWLINES) &&
openfile->current != openfile->filebot)
remove_magicline();
diff --git a/src/utils.c b/src/utils.c
@@ -437,7 +437,7 @@ size_t strlenpt(const char *text)
return span;
}
-/* Append a new magicline to the end of the buffer. */
+/* Append a new magic line to the end of the buffer. */
void new_magicline(void)
{
openfile->filebot->next = make_new_node(openfile->filebot);
@@ -447,7 +447,7 @@ void new_magicline(void)
}
#if !defined(NANO_TINY) || defined(ENABLE_HELP)
-/* Remove the magicline from the end of the buffer, if there is one and
+/* Remove the magic line from the end of the buffer, if there is one and
* it isn't the only line in the file. */
void remove_magicline(void)
{