search

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 27, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MatchLocation

type MatchLocation struct {
	FileIdx   int
	HunkIdx   int
	LineIdx   int
	FilePath  string
	StartCol  int
	EndCol    int
	MatchText string
}
type NavigationState struct {
	SelectedFile   int
	SelectedHunk   int
	DiffViewOffset int
	FocusedPanel   int
}

type SearchState

type SearchState struct {
	Query           string
	Matches         []MatchLocation
	CurrentIdx      int
	OriginalState   NavigationState
	IsActive        bool
	IsCaseSensitive bool
}

func NewSearchState

func NewSearchState() *SearchState

func (*SearchState) ExecuteSearch

func (s *SearchState) ExecuteSearch(files []diff.FileChange)

func (*SearchState) GetCurrentMatch

func (s *SearchState) GetCurrentMatch() *MatchLocation

func (*SearchState) GetMatchesForLine

func (s *SearchState) GetMatchesForLine(fileIdx, hunkIdx, lineIdx int) []MatchLocation

func (*SearchState) IsCurrentMatch

func (s *SearchState) IsCurrentMatch(fileIdx, hunkIdx, lineIdx int) bool

func (*SearchState) IsLineMatch

func (s *SearchState) IsLineMatch(fileIdx, hunkIdx, lineIdx int) bool

func (*SearchState) MatchCount

func (s *SearchState) MatchCount() int

func (*SearchState) NextMatch

func (s *SearchState) NextMatch() *MatchLocation

func (*SearchState) PrevMatch

func (s *SearchState) PrevMatch() *MatchLocation

func (*SearchState) RestoreOriginalState

func (s *SearchState) RestoreOriginalState() NavigationState

func (*SearchState) SaveOriginalState

func (s *SearchState) SaveOriginalState(nav NavigationState)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL