Do not ignore resize event from ncurses and tcell

This commit is contained in:
Junegunn Choi 2016-11-23 01:58:46 +09:00
parent 6a65006f55
commit 8524ea7441
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627
4 changed files with 4 additions and 2 deletions

View File

@ -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

View File

@ -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:

View File

@ -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:

View File

@ -37,6 +37,7 @@ const (
ESC
Invalid
Resize
Mouse
DoubleClick