From a620db8cfe6c30397132e6834bd9ade4c043f752 Mon Sep 17 00:00:00 2001 From: Andrew Phillips Date: Tue, 26 Aug 2025 19:22:42 -0300 Subject: [PATCH] feat: add word and line count output in finalize method Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) --- src/meta_plugin/text.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/meta_plugin/text.rs b/src/meta_plugin/text.rs index 1fd7f17..ff94123 100644 --- a/src/meta_plugin/text.rs +++ b/src/meta_plugin/text.rs @@ -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(&[]);