aboutsummaryrefslogtreecommitdiffstats
path: root/i_events.go
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2024-01-09 20:20:20 +0100
committerJoe <rbo@gmx.us>2024-01-09 20:20:20 +0100
commit6f866cf8feb9d5c7707e337c6edb2335c1fa16d8 (patch)
treef471d53f293ad2991d9b241721323eb277a028d7 /i_events.go
parentclean (diff)
downloadhardflip-6f866cf8feb9d5c7707e337c6edb2335c1fa16d8.tar.gz
hardflip-6f866cf8feb9d5c7707e337c6edb2335c1fa16d8.tar.bz2
hardflip-6f866cf8feb9d5c7707e337c6edb2335c1fa16d8.tar.xz
hardflip-6f866cf8feb9d5c7707e337c6edb2335c1fa16d8.tar.zst
hardflip-6f866cf8feb9d5c7707e337c6edb2335c1fa16d8.zip
folding visually
Diffstat (limited to '')
-rw-r--r--i_events.go13
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 {