shared

package
v0.0.0-...-edbbb69 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MaxVisibleWidth

func MaxVisibleWidth(content string) int

MaxVisibleWidth returns the maximum visible width across all lines in content.

func OpenPopupCmd

func OpenPopupCmd(popupType, commit string) tea.Cmd

OpenPopupCmd returns a command that emits OpenPopupMsg.

func PadRight

func PadRight(s string, width int) string

PadRight pads a string with spaces to the given width in runes.

func PadToHeight

func PadToHeight(s string, height int) string

PadToHeight ensures the string has at least height lines.

func TruncateString

func TruncateString(s string, maxRunes int) string

TruncateString truncates a string to maxRunes runes.

func YankCmd

func YankCmd(text string) tea.Cmd

YankCmd returns a command that emits YankMsg.

Types

type OpenCommitLinkMsg

type OpenCommitLinkMsg struct{ Hash string }

OpenCommitLinkMsg requests opening a commit URL in a browser.

type OpenCommitViewMsg

type OpenCommitViewMsg struct{ Hash string }

OpenCommitViewMsg requests opening the commit view for a hash.

type OpenPopupMsg

type OpenPopupMsg struct {
	Type   string
	Commit string
}

OpenPopupMsg requests opening a popup of the given type.

type YankMsg

type YankMsg struct{ Text string }

YankMsg requests copying text to the clipboard.

Jump to

Keyboard shortcuts

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