nano

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

commit 2e81023553ca9fb14c3e58861a6f51cc08b1355a
parent b9f994b2c0789ca63e6ad4671e6223554fe36c1d
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Fri, 31 May 2019 17:45:51 +0200

tweaks: rename two variables, and reshuffle their declarations

Diffstat:
Msrc/text.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/text.c b/src/text.c @@ -3027,10 +3027,10 @@ void do_linter(void) * multibyte characters instead of single-byte characters. */ void do_wordlinechar_count(void) { + linestruct *was_current = openfile->current; + size_t was_x = openfile->current_x; size_t words = 0, chars = 0; ssize_t lines = 0; - size_t current_x_save = openfile->current_x; - linestruct *current_save = openfile->current; linestruct *top, *bot; size_t top_x, bot_x; @@ -3068,8 +3068,8 @@ void do_wordlinechar_count(void) chars = openfile->totsize; /* Restore where we were. */ - openfile->current = current_save; - openfile->current_x = current_x_save; + openfile->current = was_current; + openfile->current_x = was_x; /* Display the total word, line, and character counts on the statusbar. */ statusline(HUSH, _("%sWords: %zu Lines: %zd Chars: %zu"), openfile->mark ?