go-prompt/prompt/selection.go
2017-07-04 00:56:11 +09:00

20 lines
412 B
Go

package prompt
// SelectionType expresses how characters selected.
type SelectionType int
const (
// CHARACTERS selected freely.
CHARACTERS SelectionType = iota
// LINES selected current line.
LINES
// BLOCK selected the word block.
BLOCK
)
// SelectionState holds cursor position and selected characters.
type SelectionState struct {
OriginalCursorPosition int
Type SelectionType
}