Skip to content
Myr

Do not ignore resize event from ncurses and tcell

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent 6a65006 · Browse files · 4 files+4 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

4 files+4 added−2 removed

  • other:+4 added−2 removed

4 files+4 added−2 removed

modified:src/tui/ncurses.go+1 added-1 removed
414 unmodified lines
415 }416 }417 return Event{Invalid, 0, nil}418 case C.KEY_RESIZE:419 return Event{Invalid, 0, nil}419 return Event{Resize, 0, nil}420 case ESC:421 return escSequence()422 case 127:423 return Event{BSpace, 0, nil}
26 unmodified lines
modified:src/tui/tcell.go+1 added-1 removed
181 unmodified lines
182func GetChar() Event {183 ev := _screen.PollEvent()184 switch ev := ev.(type) {185 case *tcell.EventResize:186 return Event{Invalid, 0, nil}186 return Event{Resize, 0, nil}187188 // process mouse events:189 case *tcell.EventMouse:190 x, y := ev.Position()
388 unmodified lines
modified:src/tui/tui.go+1 added
35 unmodified lines
36 CtrlZ37 ESC3839 Invalid40 Resize41 Mouse42 DoubleClick4344 BTab
212 unmodified lines
modified:src/terminal.go+1 added
188 unmodified lines
189190func defaultKeymap() map[int]actionType {191 keymap := make(map[int]actionType)192 keymap[tui.Invalid] = actInvalid193 keymap[tui.Resize] = actClearScreen194 keymap[tui.CtrlA] = actBeginningOfLine195 keymap[tui.CtrlB] = actBackwardChar196 keymap[tui.CtrlC] = actAbort197 keymap[tui.CtrlG] = actAbort
1371 unmodified lines