From 0c42c51aa4d2ed4a364d18059327732a32aac3a4 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sun, 6 Jan 2019 15:46:23 +0100 Subject: [PATCH] tweaks: rename two variables, to indicate better what they mean --- src/cut.c | 5 +++-- src/files.c | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/cut.c b/src/cut.c index 450dbb69..abc8d2e8 100644 --- a/src/cut.c +++ b/src/cut.c @@ -289,7 +289,8 @@ void do_cut_text(bool copy_text, bool marked, bool cut_till_eof, bool append) size_t cb_save_len = 0; /* The length of the string at the current end of the cutbuffer, * before we add text to it. */ - bool old_no_newlines = ISSET(NO_NEWLINES); + bool using_magicline = !ISSET(NO_NEWLINES); + /* Whether an automatic newline should be added at end-of-buffer. */ bool right_side_up = TRUE; /* There *is* no region, *or* it is marked forward. */ #endif @@ -347,7 +348,7 @@ void do_cut_text(bool copy_text, bool marked, bool cut_till_eof, bool append) openfile->placewewant = xplustabs(); } /* Restore the magic-line behavior now that we're done fiddling. */ - if (!old_no_newlines) + if (using_magicline) UNSET(NO_NEWLINES); } else #endif /* !NANO_TINY */ diff --git a/src/files.c b/src/files.c index 6f3c2a1c..02d7ca15 100644 --- a/src/files.c +++ b/src/files.c @@ -557,7 +557,7 @@ void replace_marked_buffer(const char *filename) { FILE *f; int descriptor; - bool old_no_newlines = ISSET(NO_NEWLINES); + bool using_magicline = !ISSET(NO_NEWLINES); filestruct *was_cutbuffer = cutbuffer; descriptor = open_file(filename, FALSE, TRUE, &f); @@ -583,7 +583,7 @@ void replace_marked_buffer(const char *filename) read_file(f, descriptor, filename, TRUE); /* Restore the magic-line behavior now that we're done fiddling. */ - if (!old_no_newlines) + if (using_magicline) UNSET(NO_NEWLINES); add_undo(COUPLE_END);