commit 1326af7eaea08f065d225d4b983e83372e8acf1c
parent 11aa191bdcce3aed778e44e13e8c3151722b5ff6
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Tue, 23 Apr 2019 10:05:52 +0200
tweaks: drop an unneeded saving and restoring of a variable
Since commit aa1ae0a1, from three years ago, do_next_word() no longer
changes 'placewewant'.
Diffstat:
1 file changed, 0 insertions(+), 3 deletions(-)
diff --git a/src/text.c b/src/text.c
@@ -3079,7 +3079,6 @@ void do_wordlinechar_count(void)
size_t words = 0, chars = 0;
ssize_t nlines = 0;
size_t current_x_save = openfile->current_x;
- size_t pww_save = openfile->placewewant;
linestruct *current_save = openfile->current;
linestruct *was_mark = openfile->mark;
linestruct *top, *bot;
@@ -3097,7 +3096,6 @@ void do_wordlinechar_count(void)
/* Start at the top of the file. */
openfile->current = openfile->filetop;
openfile->current_x = 0;
- openfile->placewewant = 0;
/* Keep moving to the next word (counting punctuation characters as
* part of a word, as "wc -w" does), without updating the screen,
@@ -3127,7 +3125,6 @@ void do_wordlinechar_count(void)
/* Restore where we were. */
openfile->current = current_save;
openfile->current_x = current_x_save;
- openfile->placewewant = pww_save;
/* Display the total word, line, and character counts on the statusbar. */
statusline(HUSH, _("%sWords: %zu Lines: %zd Chars: %zu"), was_mark ?