From e7d322e4c22d1d85a0b1d6a9f50a83a5f906db46 Mon Sep 17 00:00:00 2001 From: Joe Date: Wed, 24 Apr 2024 20:20:20 +0200 Subject: clone ok --- ROADMAP.md | 2 +- src/e_keys.go | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ROADMAP.md b/ROADMAP.md index 1a7d380..8d95997 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -31,7 +31,7 @@ - [x] .rdp file - [x] reload keep position - [x] add -- [ ] clone +- [x] clone - [ ] ssh jump for rdp - working but missing in add menu - [ ] edit - [ ] move diff --git a/src/e_keys.go b/src/e_keys.go index 8872039..1be652b 100644 --- a/src/e_keys.go +++ b/src/e_keys.go @@ -186,9 +186,15 @@ func e_normal_events(data *HardData, ui *HardUI, event tcell.EventKey) bool { ui.msg_buff = "yanked " + data.yank.Host.Name + " (" + data.yank.Host.parent.path() + data.yank.Host.filename + ")" } else if event.Rune() == 'p' && data.yank != nil { - // TODO: here new_host := e_paste_prepare_item(data.yank) - // e_paste_item(data.litems, new_item) + if data.litems.curr.is_dir() == true { + new_host.parent = data.litems.curr.Dirs + if data.folds[data.litems.curr.Dirs] != nil { + e_unfold_dir(data, data.litems.curr) + } + } else { + new_host.parent = data.litems.curr.Host.parent + } i_insert_host(data, &new_host) data.yank = nil ui.msg_buff = "pasted " + new_host.Name -- cgit v1.2.3