diffview

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package diffview renders unified diffs for terminal UI surfaces.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	// contains filtered or unexported fields
}

Model renders and navigates a set of file diffs.

func New

func New(files []tool.FileDiff) Model

New creates a diffview model.

func (*Model) HandleKey

func (m *Model) HandleKey(key string) bool

HandleKey applies simple navigation keys. It reports whether the key was handled.

func (Model) Next

func (m Model) Next() Model

Next selects the next file, wrapping at the end.

func (Model) Prev

func (m Model) Prev() Model

Prev selects the previous file, wrapping at the beginning.

func (Model) SelectedPath

func (m Model) SelectedPath() string

SelectedPath returns the currently selected file path.

func (Model) View

func (m Model) View() string

View renders the selected file diff.

Jump to

Keyboard shortcuts

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