fork of https://github.com/sourcegraph/zoekt
0

Configure Feed

Select the types of activity you want to include in your feed.

DisplayTruncator: always apply both limits (#632)

If the doc limit was triggered, the match limit was never evaluated,
even if it could have further reduced the FileMatches.

author
Ian Kerins
committer
GitHub
date (Aug 1, 2023, 11:00 AM +0200) commit 9559422b parent eede1229
+2 -3
+2 -3
limit.go
··· 44 44 if docLimited { 45 45 if len(fm) >= docLimit { 46 46 done = true 47 - return fm[:docLimit], false 47 + fm = fm[:docLimit] 48 48 } 49 49 docLimit -= len(fm) 50 50 } ··· 53 53 fm, matchLimit = limitMatches(fm, matchLimit, opts.ChunkMatches) 54 54 if matchLimit <= 0 { 55 55 done = true 56 - return fm, false 57 56 } 58 57 } 59 58 60 - return fm, true 59 + return fm, !done 61 60 }, true 62 61 } 63 62