aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/e_events.go14
-rw-r--r--src/e_keys.go8
2 files changed, 11 insertions, 11 deletions
diff --git a/src/e_events.go b/src/e_events.go
index eb17250..8f631a6 100644
--- a/src/e_events.go
+++ b/src/e_events.go
@@ -353,9 +353,9 @@ func e_set_protocol_defaults(data *HardData, in *HostNode) {
}
}
-func e_paste_prepare_item(yank *ItemsNode) ItemsNode {
- new_host := &HostNode{}
- *new_host = *yank.Host
+func e_paste_prepare_item(yank *ItemsNode) HostNode {
+ new_host := HostNode{}
+ new_host = *yank.Host
new_host.Name += " (copy)"
if yank.Host.Drive != nil {
new_host.Drive = make(map[string]string, len(yank.Host.Drive))
@@ -367,12 +367,12 @@ func e_paste_prepare_item(yank *ItemsNode) ItemsNode {
new_host.Shell = make([]string, len(yank.Host.Shell))
copy(new_host.Shell, yank.Host.Shell)
}
- return ItemsNode{Dirs: nil, Host: new_host}
+ return new_host
}
-func e_paste_item(litems *ItemsList, item ItemsNode) {
- curr := litems.curr
-}
+// func e_paste_item(litems *ItemsList, item ItemsNode) {
+// curr := litems.curr
+// }
// screen events such as keypresses
func e_events(data *HardData, fp [MODE_MAX + 1]key_event_mode_func) {
diff --git a/src/e_keys.go b/src/e_keys.go
index 3a60a98..8872039 100644
--- a/src/e_keys.go
+++ b/src/e_keys.go
@@ -52,7 +52,6 @@
package main
import (
- "fmt"
"os"
"strconv"
"strings"
@@ -188,10 +187,11 @@ func e_normal_events(data *HardData, ui *HardUI, event tcell.EventKey) bool {
" (" + data.yank.Host.parent.path() + data.yank.Host.filename + ")"
} else if event.Rune() == 'p' && data.yank != nil {
// TODO: here
- new_item := e_paste_prepare_item(data.yank)
- e_paste_item(data.litems, new_item)
+ new_host := e_paste_prepare_item(data.yank)
+ // e_paste_item(data.litems, new_item)
+ i_insert_host(data, &new_host)
data.yank = nil
- ui.msg_buff = "pasted " + new_item.Host.Name
+ ui.msg_buff = "pasted " + new_host.Name
}
return false
}