diff options
author | Joe <rbo@gmx.us> | 2024-01-23 20:20:20 +0100 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2024-01-23 20:20:20 +0100 |
commit | 8c9247531128afcf4951d2c426f0aa2a965a4de4 (patch) | |
tree | 64cbd67b3195d9922e975b0aeab6272270e00bf4 /src | |
parent | good loading errmsg (diff) | |
download | hardflip-8c9247531128afcf4951d2c426f0aa2a965a4de4.tar.gz hardflip-8c9247531128afcf4951d2c426f0aa2a965a4de4.tar.bz2 hardflip-8c9247531128afcf4951d2c426f0aa2a965a4de4.tar.xz hardflip-8c9247531128afcf4951d2c426f0aa2a965a4de4.tar.zst hardflip-8c9247531128afcf4951d2c426f0aa2a965a4de4.zip |
rly that was the fix
Diffstat (limited to 'src')
-rw-r--r-- | src/i_events.go | 2 | ||||
-rw-r--r-- | src/i_ui.go | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/i_events.go b/src/i_events.go index 7ca1511..f0ee03b 100644 --- a/src/i_events.go +++ b/src/i_events.go @@ -170,7 +170,6 @@ func i_reload_data(data *HardData) { g_load_count = -1 data.ldirs, data.litems, data.load_err = i_load_ui(data.data_dir, data.opts, &data.ui) - // FIX: must input to start reloading for some reason data.folds = make(map[*DirsNode]*ItemsList) } @@ -344,6 +343,7 @@ func i_events(data *HardData) { } case ERROR_MODE: if event.Rune() != 0 || + event.Key() == tcell.KeyEscape || event.Key() == tcell.KeyEnter { ui.mode = NORMAL_MODE data.load_err = nil diff --git a/src/i_ui.go b/src/i_ui.go index 6777f6c..fc82779 100644 --- a/src/i_ui.go +++ b/src/i_ui.go @@ -43,7 +43,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * hardflip: src/i_ui.go - * Tue Jan 23 14:21:09 2024 + * Tue Jan 23 16:32:01 2024 * Joe * * interfacing with the user @@ -292,20 +292,20 @@ func i_draw_load_ui(ui *HardUI) { if g_load_count % 1000 != 0 { return } - ui.s.Clear() i_draw_host_panel(*ui, false, nil, nil) i_draw_info_panel(*ui, false, nil) i_draw_msg(ui.s, 1, ui.style[BOX_STYLE], ui.dim, " Loading ") text := "Loading " + strconv.Itoa(g_load_count) + " hosts" left, right := i_left_right(len(text), ui) i_draw_text(ui.s, - left, ui.dim[H] - 2 - 1, right, ui.dim[H] - 2 - 1, ui.style[DEF_STYLE], text) + left, ui.dim[H] - 2 - 1, right, ui.dim[H] - 2 - 1, + ui.style[DEF_STYLE], text) i_draw_text(ui.s, ui.dim[W] - 5, ui.dim[H] - 1, ui.dim[W], ui.dim[H] - 1, ui.style[DEF_STYLE].Dim(true), " " + VERSION) ui.s.Show() + ui.s.PostEvent(nil) event := ui.s.PollEvent() - ui.s.PostEvent(event) switch event := event.(type) { case *tcell.EventResize: ui.dim[W], ui.dim[H], _ = term.GetSize(0) |