diffpane

package
v0.0.0-...-7d86b93 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package diffpane renders a unified git diff with chroma syntax highlighting.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Render

func Render(files []*gitdiff.File) string

Render produces a colored unified-diff string from parsed files.

Types

type LoadedMsg

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

type Model

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

func New

func New() Model

func (Model) Init

func (m Model) Init() tea.Cmd

func (*Model) Refresh

func (m *Model) Refresh() tea.Cmd

Refresh runs `git diff HEAD` and updates the viewport.

func (*Model) SetRepoRoot

func (m *Model) SetRepoRoot(p string)

func (*Model) SetSize

func (m *Model) SetSize(w, h int)

func (Model) Update

func (m Model) Update(msg tea.Msg) (Model, tea.Cmd)

func (Model) View

func (m Model) View() string

Jump to

Keyboard shortcuts

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