acorp

package
v0.0.0-...-5e37444 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EventLineNumber

func EventLineNumber(w *acme.Win, e *acme.Event) (int, error)

EventLineNumber returns the line that a e occurred on in w

func GetCurrentWindow

func GetCurrentWindow() (*acme.Win, error)

GetCurrentWindow finds the current active window in acme, using the snooper if this is not called from inside of an acme window directly.

func SetCursorBOL

func SetCursorBOL(w *acme.Win, line int)

SetCursorBOL will position the current window cursor at the beginning of line.

func SetCursorEOL

func SetCursorEOL(w *acme.Win, line int)

SetCursorEOL will position the current window cursor at the end of line.

func WindowBody

func WindowBody(w *acme.Win) (string, error)

WindowBody reads the body of the current window as single string

func WindowBodyLines

func WindowBodyLines(w *acme.Win) ([]string, error)

WindowBodyLines reads the body of the current window as an array of strings split on newline

Types

type EventFilter

type EventFilter struct {
	KeyboardInputBody  handler
	KeyboardDeleteBody handler
	KeyboardInputTag   handler
	KeyboardDeleteTag  handler
	Mouse2Body         handler
	Mouse3Body         handler
	Mouse2Tag          handler
	Mouse3Tag          handler
	// contains filtered or unexported fields
}

An EventFilter takes hold of an acme window's event file and passes all events it sees through a set of filter functions if they are defined. Unmatched events are passed through to acme.

func (*EventFilter) Filter

func (ef *EventFilter) Filter(w *acme.Win) error

Filter runs the event filter, releasing the window event file on the first error encountered

Jump to

Keyboard shortcuts

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