tweaks: rename a variable, to have more contrast

master
Benno Schulenberg 2017-07-09 21:11:01 +02:00
parent fbbf501f8f
commit ecc7c26641
2 changed files with 6 additions and 6 deletions

View File

@ -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;

View File

@ -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