aboutsummaryrefslogtreecommitdiffstats
path: root/i_events.go
diff options
context:
space:
mode:
Diffstat (limited to 'i_events.go')
-rw-r--r--i_events.go23
1 files changed, 8 insertions, 15 deletions
diff --git a/i_events.go b/i_events.go
index c1a3951..ba1b910 100644
--- a/i_events.go
+++ b/i_events.go
@@ -76,30 +76,23 @@ func i_events(data *HardData) {
event.Rune() == 'q' {
ui.s.Fini()
os.Exit(0)
- }
- if event.Rune() == 'j' ||
+ } else if event.Rune() == 'j' ||
event.Key() == tcell.KeyDown {
if ui.sel < ui.sel_max - 1 {
ui.sel += 1
}
- }
- if event.Rune() == 'k' ||
+ } else if event.Rune() == 'k' ||
event.Key() == tcell.KeyUp {
if ui.sel > 0 {
ui.sel -= 1
}
- }
- if event.Rune() == 'g' {
- ui.sel = 0
- }
- if event.Rune() == 'G' {
- ui.sel = ui.sel_max - 1
- }
- if event.Rune() == 'D' {
+ } else if event.Rune() == 'g' {
+ ui.sel = 0
+ } else if event.Rune() == 'G' {
+ ui.sel = ui.sel_max - 1
+ } else if event.Rune() == 'D' {
ui.mode = DELETE_MODE
- ui.delete_id = ui.sel
- }
- if event.Key() == tcell.KeyEnter {
+ } else if event.Key() == tcell.KeyEnter {
ui.s.Fini()
c_exec(ui.sel, data.lhost)
if data.opts.loop == false {