feat: add word and line count output in finalize method

Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat>
This commit is contained in:
Andrew Phillips
2025-08-26 19:22:42 -03:00
parent cf4254750d
commit a620db8cfe

View File

@@ -232,7 +232,7 @@ impl MetaPlugin for TextMetaPlugin {
}
// If content is text and we have some data, output word and line counts
if self.is_binary_content == Some(false) && !self.buffer.is_empty() {
if self.is_binary_content == Some(false) && (!self.buffer.is_empty() || self.word_count > 0 || self.line_count > 0) {
// Process any remaining data in utf8_buffer
if !self.utf8_buffer.is_empty() {
self.count_text_stats(&[]);