Skip to content

Remove unused extractSearchPreview function #8

@Fuabioo

Description

@Fuabioo

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions