Fix 'gg' and 'dd' keypresses

This commit is contained in:
Caleb Bassi 2018-12-04 21:07:14 -08:00
parent db57b40659
commit 3dee8bc6f2
1 changed files with 6 additions and 3 deletions

View File

@ -296,7 +296,6 @@ func eventLoop() {
if previousKey == "g" { if previousKey == "g" {
proc.Top() proc.Top()
ui.Render(proc) ui.Render(proc)
previousKey = ""
} }
case "G", "<End>": case "G", "<End>":
proc.Bottom() proc.Bottom()
@ -316,7 +315,6 @@ func eventLoop() {
case "d": case "d":
if previousKey == "d" { if previousKey == "d" {
proc.Kill() proc.Kill()
previousKey = ""
} }
case "<Tab>": case "<Tab>":
proc.Tab() proc.Tab()
@ -325,7 +323,12 @@ func eventLoop() {
proc.ChangeSort(e) proc.ChangeSort(e)
ui.Render(proc) ui.Render(proc)
} }
previousKey = e.ID
if previousKey == e.ID {
previousKey = ""
} else {
previousKey = e.ID
}
} }
} }
} }