- 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)
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
#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;
/* 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 */