diff --git a/ChangeLog b/ChangeLog index ae412ec17c251b45705dc7eda355df70755999ee..44d1ef1c119189c7b421a5b1a7831c51f3568bc0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -208,8 +208,9 @@ CVS code - - Make parameters const where possible. (DLR) - text.c: do_word_count() - - Expand to also count the number of lines and characters in the - file or selection, as wc does. (DLR) + - Rename to do_wordlinechar_count(), and expand to also count + the number of lines and characters in the file or selection, + as wc does. (DLR) - winio.c: edit_redraw(), edit_refresh() - Clean up and simplify. (DLR) diff --git a/src/global.c b/src/global.c index 8917b063bd18ea772649fb2a904f9ad50435838e..d6b38abe0df86abd5f173af9bd261d25d68f4ba9 100644 --- a/src/global.c +++ b/src/global.c @@ -544,7 +544,7 @@ void shortcut_init(bool unjustify) sc_init_one(&main_list, NANO_NO_KEY, N_("Word Count"), IFHELP(nano_wordcount_msg, NANO_WORDCOUNT_KEY), NANO_NO_KEY, - NANO_NO_KEY, VIEW, do_word_count); + NANO_NO_KEY, VIEW, do_wordlinechar_count); #endif #ifndef DISABLE_JUSTIFY diff --git a/src/proto.h b/src/proto.h index 877a03dc8fc9aaf13e172772e9a5173796226c77..aacd8e46779a49f3b5095a881c731870f3a304f4 100644 --- a/src/proto.h +++ b/src/proto.h @@ -529,7 +529,7 @@ const char *do_alt_speller(char *tempfile_name); void do_spell(void); #endif #ifndef NANO_SMALL -void do_word_count(void); +void do_wordlinechar_count(void); #endif /* Public functions in utils.c. */ diff --git a/src/text.c b/src/text.c index b7fec6f963ee6e3ae2162e8265a81ac35242247f..f5cf86846507ca5e131c1a4c0a3b403be46b60d1 100644 --- a/src/text.c +++ b/src/text.c @@ -2047,7 +2047,7 @@ void do_spell(void) #endif /* !DISABLE_SPELLER */ #ifndef NANO_SMALL -void do_word_count(void) +void do_wordlinechar_count(void) { size_t words = 0, lines = 0, chars = 0; size_t current_x_save = openfile->current_x; @@ -2115,10 +2115,10 @@ void do_word_count(void) /* Display the total word, line, and character counts on the * statusbar. */ - statusbar("%s: %lu %s, %lu %s, %lu %s", old_mark_set ? - _("In selection") : _("In file"), (unsigned long)words, - P_("word", "words", (unsigned long)words), (unsigned long)lines, - P_("line", "lines", (unsigned long)lines), (unsigned long)chars, - P_("char", "chars", (unsigned long)chars)); + statusbar("%s%lu %s, %lu %s, %lu %s", old_mark_set ? + _("In selection: ") : "", (unsigned long)words, P_("word", + "words", (unsigned long)words), (unsigned long)lines, P_("line", + "lines", (unsigned long)lines), (unsigned long)chars, P_("char", + "chars", (unsigned long)chars)); } #endif /* !NANO_SMALL */