From 442247fd61f65d50efae5d5c3548d40aa868d464 Mon Sep 17 00:00:00 2001 From: aliang <1098486429@qq.com> Date: Wed, 10 Jul 2024 11:37:20 +0900 Subject: [PATCH] fix(ui): correct the result counts of code searching (#2609) --- ee/tabby-ui/app/files/components/code-search-result-view.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ee/tabby-ui/app/files/components/code-search-result-view.tsx b/ee/tabby-ui/app/files/components/code-search-result-view.tsx index c43ba7934..019b4f918 100644 --- a/ee/tabby-ui/app/files/components/code-search-result-view.tsx +++ b/ee/tabby-ui/app/files/components/code-search-result-view.tsx @@ -47,7 +47,7 @@ export const CodeSearchResultView = (props: CodeSearchResultViewProps) => { return sum + _matchCount }, 0) - count += curCount + count += Math.max(curCount, 1) } const format = count < 1000 ? '0' : '0.0a' return numeral(count).format(format)