diff options
Diffstat (limited to 'i_events.go')
-rw-r--r-- | i_events.go | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/i_events.go b/i_events.go index 4ea2a1a..9989d2a 100644 --- a/i_events.go +++ b/i_events.go @@ -43,7 +43,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * hardflip: src/i_events.go - * Mon Jan 08 16:40:17 2024 + * Tue Jan 09 12:00:50 2024 * Joe * * events in the code @@ -146,8 +146,9 @@ func i_events(data *HardData) { ui.sel_max != 0 { ui.mode = DELETE_MODE } else if event.Key() == tcell.KeyEnter { - if data.litems.curr != nil && - data.litems.curr.is_dir() == false { + if data.litems.curr == nil { + return + } else if data.litems.curr.is_dir() == false { ui.s.Fini() c_exec(data.litems.curr.Host) if data.opts.Loop == false { @@ -161,6 +162,12 @@ func i_events(data *HardData) { } ui.s.SetStyle(ui.def_style) } + } else { + if data.litems.curr.Dirs.Folded == false { + data.litems.curr.Dirs.Folded = true + } else { + data.litems.curr.Dirs.Folded = false + } } } if event.Key() == tcell.KeyCtrlR { |