aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/i_events.go4
-rw-r--r--src/i_insert.go17
2 files changed, 9 insertions, 12 deletions
diff --git a/src/i_events.go b/src/i_events.go
index cc7c4be..de0a99a 100644
--- a/src/i_events.go
+++ b/src/i_events.go
@@ -600,6 +600,10 @@ func i_events(data *HardData) {
case 11:
data.ui.insert_sel_ok = false
i_insert_check_ok(data, data.insert)
+ if data.insert_err != nil {
+ break
+ }
+ i_insert_host(data, data.insert)
}
}
} else {
diff --git a/src/i_insert.go b/src/i_insert.go
index f21fdd9..f57c458 100644
--- a/src/i_insert.go
+++ b/src/i_insert.go
@@ -53,13 +53,16 @@ package main
import (
"errors"
- // "fmt"
"os"
"strconv"
"github.com/gdamore/tcell/v2"
)
+func i_insert_host(data *HardData, insert *HostNode) {
+ tmp_next := data.litems.curr.next
+}
+
func i_insert_check_ok(data *HardData, insert *HostNode) {
if len(insert.Name) == 0 {
data.insert_err = append(data.insert_err, errors.New("no name"))
@@ -141,8 +144,6 @@ func i_draw_ok_butt(ui HardUI, line int, id, selected int) {
(ui.dim[W] / 2) + (butt_size / 2), line, style, buff)
}
-var start_line int
-
func i_draw_insert_panel(ui HardUI, in *HostNode) {
if len(in.Name) == 0 {
return
@@ -168,15 +169,7 @@ func i_draw_insert_panel(ui HardUI, in *HostNode) {
}
if win.T + end_line >= win.B {
ui.s.SetContent(ui.dim[W] / 2, win.B, '▼', nil, ui.style[BOX_STYLE])
- // ui.s.Fini()
- // fmt.Println("end_line ", end_line)
- // fmt.Println("win.T ", win.T)
- // fmt.Println("win.T+end", win.T + end_line)
- // fmt.Println("win.B ", win.B)
- // fmt.Println("insert_sel ", ui.insert_sel)
- // fmt.Println("insert_max ", ui.insert_sel_max)
- // os.Exit(0)
- // TODO: here
+ // TODO: scroll or something
}
}