Do not ignore resize event from ncurses and tcell
This commit is contained in:
parent
6a65006f55
commit
8524ea7441
@ -190,6 +190,7 @@ const (
|
||||
func defaultKeymap() map[int]actionType {
|
||||
keymap := make(map[int]actionType)
|
||||
keymap[tui.Invalid] = actInvalid
|
||||
keymap[tui.Resize] = actClearScreen
|
||||
keymap[tui.CtrlA] = actBeginningOfLine
|
||||
keymap[tui.CtrlB] = actBackwardChar
|
||||
keymap[tui.CtrlC] = actAbort
|
||||
|
@ -416,7 +416,7 @@ func GetChar() Event {
|
||||
}
|
||||
return Event{Invalid, 0, nil}
|
||||
case C.KEY_RESIZE:
|
||||
return Event{Invalid, 0, nil}
|
||||
return Event{Resize, 0, nil}
|
||||
case ESC:
|
||||
return escSequence()
|
||||
case 127:
|
||||
|
@ -183,7 +183,7 @@ func GetChar() Event {
|
||||
ev := _screen.PollEvent()
|
||||
switch ev := ev.(type) {
|
||||
case *tcell.EventResize:
|
||||
return Event{Invalid, 0, nil}
|
||||
return Event{Resize, 0, nil}
|
||||
|
||||
// process mouse events:
|
||||
case *tcell.EventMouse:
|
||||
|
@ -37,6 +37,7 @@ const (
|
||||
ESC
|
||||
|
||||
Invalid
|
||||
Resize
|
||||
Mouse
|
||||
DoubleClick
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user