Make arrows work
This commit is contained in:
parent
5194fe1e9b
commit
4dfe797467
@ -30,7 +30,13 @@ func New() *editor {
|
|||||||
func (e *editor) ProcessKeypress() bool {
|
func (e *editor) ProcessKeypress() bool {
|
||||||
var runes []rune
|
var runes []rune
|
||||||
|
|
||||||
for ch, size := terminal.ReadKey(); size != 0; ch, size = terminal.ReadKey() {
|
// for ch, size := terminal.ReadKey(); size != 0; ch, size = terminal.ReadKey() {
|
||||||
|
for i := 0; i < 3; i++ {
|
||||||
|
ch, size := terminal.ReadKey()
|
||||||
|
if size == 0 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
if ch == fn.Ctrl('q') {
|
if ch == fn.Ctrl('q') {
|
||||||
// Clean up on exit
|
// Clean up on exit
|
||||||
terminal.Write(terminal.ClearScreen + terminal.ResetCursor)
|
terminal.Write(terminal.ClearScreen + terminal.ResetCursor)
|
||||||
|
Loading…
Reference in New Issue
Block a user