docs: annotate ui struct fields (#2402)
This commit is contained in:
1 parent
34757604ab
commit
34ed26821c
1 file changed
+28
-28
@@ -624,37 +624,37 @@ func getWins(screen tcell.Screen) []*win {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type menuSelect struct {
|
type menuSelect struct {
|
||||||
x, y int
|
x, y int // selection position in menuWin (cells)
|
||||||
s string
|
s string // selected entry text to draw with `menuselectfmt`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ui struct {
|
type ui struct {
|
||||||
screen tcell.Screen
|
screen tcell.Screen // primary screen used for drawing and event polling
|
||||||
sxScreen sixelScreen
|
sxScreen sixelScreen // sixel preview state
|
||||||
polling bool
|
polling bool // whether event polling is running
|
||||||
wins []*win
|
wins []*win // pane windows from `ratios` (last is `preview` when enabled)
|
||||||
promptWin *win
|
promptWin *win // prompt line window
|
||||||
msgWin *win
|
msgWin *win // status line window
|
||||||
menuWin *win
|
menuWin *win // menu window
|
||||||
msg string
|
msg string // message/output shown in msgWin
|
||||||
exprChan chan expr
|
exprChan chan expr // expr queue
|
||||||
keyChan chan string
|
keyChan chan string // key queue (send via `push`)
|
||||||
tevChan chan tcell.Event
|
tevChan chan tcell.Event // terminal events from screen.PollEvent
|
||||||
evChan chan tcell.Event
|
evChan chan tcell.Event // merged event queue (keyChan + tevChan)
|
||||||
menu string
|
menu string // rendered (multiline) menu text (i.e. completions, binds, marks)
|
||||||
menuSelect *menuSelect
|
menuSelect *menuSelect // selected menu entry (completion menu only)
|
||||||
cmdPrefix string
|
cmdPrefix string // command prefix/prompt (empty: Normal mode)
|
||||||
cmdAccLeft []rune
|
cmdAccLeft []rune // command buffer left of cursor
|
||||||
cmdAccRight []rune
|
cmdAccRight []rune // command buffer right of cursor
|
||||||
cmdYankBuf []rune
|
cmdYankBuf []rune // yank buffer for command line editing
|
||||||
keyAcc []rune
|
keyAcc []rune // keys typed so far for mapping lookup
|
||||||
keyCount []rune
|
keyCount []rune // count prefix for next command
|
||||||
styles styleMap
|
styles styleMap // parsed styles
|
||||||
icons iconMap
|
icons iconMap // parsed icons
|
||||||
ruler *template.Template
|
ruler *template.Template // compiled `rulerfile`
|
||||||
rulerErr error
|
rulerErr error // `rulerfile` parse error (if any)
|
||||||
currentFile string
|
currentFile string // last path passed to `on-select`
|
||||||
pasteEvent bool
|
pasteEvent bool // whether paste event is active (to ignore pasted input in Normal mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
func newUI(screen tcell.Screen) *ui {
|
func newUI(screen tcell.Screen) *ui {
|
||||||
|
|||||||
Reference in new issue
Block a user