aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2024-04-24 20:20:20 +0200
committerJoe <rbo@gmx.us>2024-04-24 20:20:20 +0200
commite7d322e4c22d1d85a0b1d6a9f50a83a5f906db46 (patch)
tree66396daa210bd68e424c1fcfddab6c94e0b39a19
parentok cool now (diff)
downloadhardflip-e7d322e4c22d1d85a0b1d6a9f50a83a5f906db46.tar.gz
hardflip-e7d322e4c22d1d85a0b1d6a9f50a83a5f906db46.tar.bz2
hardflip-e7d322e4c22d1d85a0b1d6a9f50a83a5f906db46.tar.xz
hardflip-e7d322e4c22d1d85a0b1d6a9f50a83a5f906db46.tar.zst
hardflip-e7d322e4c22d1d85a0b1d6a9f50a83a5f906db46.zip
clone ok
-rw-r--r--ROADMAP.md2
-rw-r--r--src/e_keys.go10
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