aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2024-01-15 20:20:20 +0100
committerJoe <rbo@gmx.us>2024-01-15 20:20:20 +0100
commitfe29f370a8813e1268ae57fc4b80dbab74ef71b5 (patch)
treea491a6c798d472cc300925201833471fb3b61e25
parentfix (diff)
downloadhardflip-fe29f370a8813e1268ae57fc4b80dbab74ef71b5.tar.gz
hardflip-fe29f370a8813e1268ae57fc4b80dbab74ef71b5.tar.bz2
hardflip-fe29f370a8813e1268ae57fc4b80dbab74ef71b5.tar.xz
hardflip-fe29f370a8813e1268ae57fc4b80dbab74ef71b5.tar.zst
hardflip-fe29f370a8813e1268ae57fc4b80dbab74ef71b5.zip
fix
-rw-r--r--c_litems.go2
-rw-r--r--i_ui.go28
2 files changed, 18 insertions, 12 deletions
diff --git a/c_litems.go b/c_litems.go
index e3f26bb..229df41 100644
--- a/c_litems.go
+++ b/c_litems.go
@@ -43,7 +43,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* hardflip: src/c_litems.go
- * Thu Jan 11 18:37:44 2024
+ * Mon Jan 15 17:21:57 2024
* Joe
*
* the dir and hosts linked list
diff --git a/i_ui.go b/i_ui.go
index bb354b9..78d2592 100644
--- a/i_ui.go
+++ b/i_ui.go
@@ -496,28 +496,34 @@ func i_info_panel(ui HardUI, litems *ItemsList) {
ui.s.SetContent(ui.dim[W] / 3, 0, tcell.RuneTTee, nil, ui.def_style)
ui.s.SetContent(ui.dim[W] / 3, ui.dim[H] - 2,
tcell.RuneBTee, nil, ui.def_style)
- if litems.head == nil {
- return
- } else if litems.curr.is_dir() == true {
- i_info_panel_dirs(ui, litems.curr.Dirs)
- } else {
- i_info_panel_host(ui, litems.curr.Host)
- }
// number display
if litems.head != nil {
text := " " + strconv.Itoa(litems.curr.ID) + " of " +
strconv.Itoa(int(litems.last.ID)) + " "
i_draw_text(ui.s,
- (ui.dim[W] - 1) - len(text),
+ (ui.dim[W] - 1) - len(text) - 1,
+ ui.dim[H] - 2,
+ (ui.dim[W] - 1) - 1,
ui.dim[H] - 2,
- (ui.dim[W] - 1) - 1, ui.dim[H] - 2,
ui.def_style,
text)
} else {
+ text := " 0 hosts "
i_draw_text(ui.s,
- 1, ui.dim[H] - 2, (ui.dim[W] / 3) - 1, ui.dim[H] - 2,
+ (ui.dim[W] - 1) - len(text) - 1,
+ ui.dim[H] - 2,
+ (ui.dim[W] - 1) - 1,
+ ui.dim[H] - 2,
ui.def_style,
- " 0 hosts ")
+ text)
+ }
+ // panel
+ if litems.head == nil {
+ return
+ } else if litems.curr.is_dir() == true {
+ i_info_panel_dirs(ui, litems.curr.Dirs)
+ } else {
+ i_info_panel_host(ui, litems.curr.Host)
}
}