go-prompt/prompt/selection.go

20 lines
412 B
Go
Raw Normal View History

2017-07-03 15:54:43 +00:00
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
}