Help us shape the future of Go! Take the 2026 Go Developer Survey

statusbar

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package statusbar renders the single-line footer: the mode, the diff's source and destination, and the keybinding hints for whatever the user is doing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	Destination  string
	FocusedPanel string
	Mode         string
	Source       string
	IsVisualMode bool
}

Context is what the footer describes. Destination is omitted from the render when empty, and FocusedPanel is "files" or the diff pane, which selects which hints are shown.

type Model

type Model struct{}

Model is stateless: the footer is rendered entirely from the Context passed to each call.

func New

func New() Model

New returns the footer renderer.

func (Model) View

func (m Model) View(width int, modeText, source, destination string, isVisualMode bool) string

View renders the footer with the file list treated as focused. Use ViewWithContext to say which panel has focus.

func (Model) ViewWithContext

func (m Model) ViewWithContext(width int, ctx Context) string

ViewWithContext renders the footer to exactly width columns. Content longer than that is clipped from the right with no ellipsis, which drops the rightmost hints without saying so.

Jump to

Keyboard shortcuts

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