Problem
The extractSearchPreview function in internal/history/search.go (lines 233-289) is defined but never called anywhere in the codebase.
Evidence
// extractSearchPreview extracts a preview snippet around the match.
func extractSearchPreview(line []byte, query string, caseSensitive bool, maxLen int) string {
// 57 lines of implementation...
}
A grep confirms no call sites exist - the searchFile function uses extractPreviewFromText instead (lines 189-230).
Impact
This is ~57 lines of dead code that adds maintenance burden and could confuse future contributors trying to understand the codebase.
Suggested Fix
Delete the extractSearchPreview function. This is a simple cleanup task.
Files: internal/history/search.go:233-289
Problem
The
extractSearchPreviewfunction ininternal/history/search.go(lines 233-289) is defined but never called anywhere in the codebase.Evidence
A grep confirms no call sites exist - the
searchFilefunction usesextractPreviewFromTextinstead (lines 189-230).Impact
This is ~57 lines of dead code that adds maintenance burden and could confuse future contributors trying to understand the codebase.
Suggested Fix
Delete the
extractSearchPreviewfunction. This is a simple cleanup task.Files:
internal/history/search.go:233-289