aboutsummaryrefslogtreecommitdiffstats
path: root/src/i_events.go
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2024-03-27 20:20:20 +0100
committerJoe <rbo@gmx.us>2024-03-27 20:20:20 +0100
commit8d1bb55ef66e450106c22ae18c7105029e75f338 (patch)
tree0d7da559504293ebe923d474fa159a4d9ea55999 /src/i_events.go
parentk (diff)
downloadhardflip-8d1bb55ef66e450106c22ae18c7105029e75f338.tar.gz
hardflip-8d1bb55ef66e450106c22ae18c7105029e75f338.tar.bz2
hardflip-8d1bb55ef66e450106c22ae18c7105029e75f338.tar.xz
hardflip-8d1bb55ef66e450106c22ae18c7105029e75f338.tar.zst
hardflip-8d1bb55ef66e450106c22ae18c7105029e75f338.zip
great
Diffstat (limited to '')
-rw-r--r--src/i_events.go15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/i_events.go b/src/i_events.go
index 0c9c968..1ba9e7a 100644
--- a/src/i_events.go
+++ b/src/i_events.go
@@ -322,7 +322,7 @@ func i_set_protocol_defaults(data *HardData, in *HostNode) {
case 0:
in.Port = 22
in.Jump.Port = 22
- data.ui.insert_sel_max = 10
+ data.ui.insert_sel_max = 11
case 1:
in.Port = 3389
in.Quality = 2
@@ -549,7 +549,13 @@ func i_events(data *HardData) {
i_readline(event, data)
}
} else if data.insert != nil {
- if data.ui.insert_sel_ok == false {
+ if data.insert_err != nil {
+ if event.Rune() != 0 ||
+ event.Key() == tcell.KeyEscape ||
+ event.Key() == tcell.KeyEnter {
+ data.insert_err = nil
+ }
+ } else if data.ui.insert_sel_ok == false {
if event.Key() == tcell.KeyEscape ||
event.Key() == tcell.KeyCtrlC ||
event.Rune() == 'q' {
@@ -583,6 +589,9 @@ func i_events(data *HardData) {
case 8: ui.buff = data.insert.Jump.User
case 9: break
case 10: ui.buff = data.insert.Jump.Priv
+ case 11:
+ data.ui.insert_sel_ok = false
+ i_insert_check_ok(data, data.insert)
}
}
} else {
@@ -649,8 +658,8 @@ func i_events(data *HardData) {
if event.Key() == tcell.KeyEscape ||
event.Key() == tcell.KeyCtrlC {
ui.s.HideCursor()
- ui.buff = ""
ui.mode = NORMAL_MODE
+ ui.buff = ""
data.insert = nil
} else if event.Key() == tcell.KeyEnter {
i_mkdir(data, ui)