From fa3d12a782b379a9abf53cbea74113703035c287 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Fri, 11 Sep 2020 16:07:51 -0700 Subject: [PATCH] Don't add line number to result_text if we're skipping this result. --- search.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/search.py b/search.py index de9fbf0..254dd46 100644 --- a/search.py +++ b/search.py @@ -181,12 +181,12 @@ def search( search_text = search_object result_text = search_object - if line_numbers: - result_text = f'{index+1:>4} | {result_text}' - if not all_terms_match(search_text, terms, term_matches): continue + if line_numbers: + result_text = f'{index+1:>4} | {result_text}' + if not content_args: yield result_text continue