diff options
author | Joe <rbo@gmx.us> | 2024-05-08 20:20:20 +0200 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2024-05-08 20:20:20 +0200 |
commit | a113f3decb3c1ec22cac88051ccdd2ae24d759e4 (patch) | |
tree | 51989ae6039aec31587317dcc76b27c22b131b10 /src | |
parent | fix (diff) | |
download | hardflip-a113f3decb3c1ec22cac88051ccdd2ae24d759e4.tar.gz hardflip-a113f3decb3c1ec22cac88051ccdd2ae24d759e4.tar.bz2 hardflip-a113f3decb3c1ec22cac88051ccdd2ae24d759e4.tar.xz hardflip-a113f3decb3c1ec22cac88051ccdd2ae24d759e4.tar.zst hardflip-a113f3decb3c1ec22cac88051ccdd2ae24d759e4.zip |
tmp
Diffstat (limited to 'src')
-rw-r--r-- | src/c_defs.go | 5 | ||||
-rw-r--r-- | src/e_keys.go | 1 | ||||
-rw-r--r-- | src/i_insert.go | 5 |
3 files changed, 7 insertions, 4 deletions
diff --git a/src/c_defs.go b/src/c_defs.go index 465db95..3aa1884 100644 --- a/src/c_defs.go +++ b/src/c_defs.go @@ -60,10 +60,9 @@ const ( ) const ( - NORMAL_KEYS_HINTS = `!a/i: insert host - + NORMAL_KEYS_HINTS = `a/i: insert host - m: mkdir - -!s: search - -[C-r]: reload +[C-r]: reload - !?: help` ERROR_KEYS_HINTS = "[Enter]: ok" CONFIRM_KEYS_HINTS = `y/n: yes - no` diff --git a/src/e_keys.go b/src/e_keys.go index fc506cc..b386ba4 100644 --- a/src/e_keys.go +++ b/src/e_keys.go @@ -377,7 +377,6 @@ func e_insert_events(data *HardData, ui *HardUI, event tcell.EventKey) bool { if data.insert.Protocol == PROTOCOL_RDP && ui.insert_sel == INS_PROTOCOL { ui.insert_sel = INS_RDP_HOST - } else if data.insert.Protocol == PROTOCOL_RDP && ui.insert_sel == INS_RDP_JUMP_HOST + len(data.insert.Drive) && diff --git a/src/i_insert.go b/src/i_insert.go index b7c37b4..e556a9c 100644 --- a/src/i_insert.go +++ b/src/i_insert.go @@ -440,6 +440,10 @@ func i_draw_insert_inputs(ui HardUI, in *HostNode, home_dir string) { } } +func i_insert_follow_cursor(ui *HardUI, line int) int { + return line - 15 +} + func i_draw_insert_panel(ui HardUI, in *HostNode, home_dir string) { type draw_insert_func func(ui HardUI, line int, win Quad, in *HostNode, home string) int @@ -468,6 +472,7 @@ func i_draw_insert_panel(ui HardUI, in *HostNode, home_dir string) { i_draw_insert_cmd, i_draw_insert_os, } + line = i_insert_follow_cursor(&ui, line) end_line = fp[in.Protocol](ui, line, win, in, home_dir) if win.T + end_line >= win.B { ui.s.SetContent(ui.dim[W] / 2, win.B, '▼', nil, ui.style[BOX_STYLE]) |