screen

package
v1.4.2-0...-d7b39fe Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DrawChan chan bool
View Source
var Screen tcell.Screen

Screen is the tcell screen we use to draw to the terminal Synchronization is used because we poll the screen on a separate thread and sometimes the screen is shut down by the main thread (for example on TermMessage) so we don't want to poll a nil/shutdown screen. TODO: maybe we should worry about polling and drawing at the same time too.

Functions

func Init

func Init()

Init creates and initializes the tcell screen

func Lock

func Lock()

func Redraw

func Redraw()

func TempFini

func TempFini() bool

TempFini shuts the screen down temporarily

func TempStart

func TempStart(screenWasNil bool)

TempStart restarts the screen after it was temporarily disabled

func TermError

func TermError(filename string, lineNum int, err string)

TermError sends an error to the user in the terminal. Like TermMessage except formatted as an error

func TermMessage

func TermMessage(msg ...interface{})

TermMessage sends a message to the user in the terminal. This usually occurs before micro has been fully initialized -- ie if there is an error in the syntax highlighting regular expressions The function must be called when the Screen is not initialized This will write the message, and wait for the user to press and key to continue

func TermPrompt

func TermPrompt(prompt string, options []string, wait bool) int

TermPrompt prints a prompt and requests the user for a response The result is matched against a list of options and the index of the match is returned If wait is true, the prompt re-prompts until a valid option is chosen, otherwise if wait is false, -1 is returned for no match

func Unlock

func Unlock()

Types

This section is empty.

Jump to

Keyboard shortcuts

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