nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit ecc7c266416503ba22c42c7e16af38388b5d5b87
parent fbbf501f8fb234dcc6e86a7f6bccc8233baa5d0b
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sun,  9 Jul 2017 21:11:01 +0200

tweaks: rename a variable, to have more contrast

Diffstat:
Msrc/nano.c | 6+++---
Msrc/text.c | 6+++---
2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/nano.c b/src/nano.c @@ -1808,12 +1808,12 @@ void do_output(char *output, size_t output_len, bool allow_cntrls) size_t current_len = strlen(openfile->current->data); size_t i = 0; #ifndef NANO_TINY - size_t orig_rows = 0, original_row = 0; + size_t original_row = 0, old_amount = 0; if (ISSET(SOFTWRAP)) { if (openfile->current_y == editwinrows - 1) original_row = chunk_for(xplustabs(), openfile->current); - orig_rows = number_of_chunks_in(openfile->current); + old_amount = number_of_chunks_in(openfile->current); } #endif @@ -1878,7 +1878,7 @@ void do_output(char *output, size_t output_len, bool allow_cntrls) * of the edit window, and we moved one screen row, we're now below * the last line of the edit window, so we need a full refresh too. */ if (ISSET(SOFTWRAP) && refresh_needed == FALSE && - (number_of_chunks_in(openfile->current) != orig_rows || + (number_of_chunks_in(openfile->current) != old_amount || (openfile->current_y == editwinrows - 1 && chunk_for(xplustabs(), openfile->current) != original_row))) refresh_needed = TRUE; diff --git a/src/text.c b/src/text.c @@ -91,7 +91,7 @@ char *invocation_error(const char *name) void do_deletion(undo_type action) { #ifndef NANO_TINY - size_t orig_rows = 0; + size_t old_amount = 0; #endif assert(openfile->current != NULL && openfile->current->data != NULL && @@ -112,7 +112,7 @@ void do_deletion(undo_type action) update_undo(action); if (ISSET(SOFTWRAP)) - orig_rows = number_of_chunks_in(openfile->current); + old_amount = number_of_chunks_in(openfile->current); #endif /* Move the remainder of the line "in", over the current character. */ @@ -181,7 +181,7 @@ void do_deletion(undo_type action) /* If the number of screen rows that a softwrapped line occupies * has changed, we need a full refresh. */ if (ISSET(SOFTWRAP) && refresh_needed == FALSE && - number_of_chunks_in(openfile->current) != orig_rows) + number_of_chunks_in(openfile->current) != old_amount) refresh_needed = TRUE; #endif