diff --git a/src/nano.c b/src/nano.c index dc538d8bcbdad629b2b68517da535351952f2b7e..f2a7edbbc16a4b4e3012fd07d8bf84f65c55ffd2 100644 --- 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 index b7e9f299dc2f7bef75ecd15aa7de66946b469239..1be1a4e2c4f70abf055e5f35f8213dff6f009877 100644 --- 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