rename mark to selection

This commit is contained in:
Gokcehan committed 2018-07-09 21:22:10 +03:00
1 parent 552182958a
commit a80900f41e
9 files changed
+75 -75

No files matched your search

+7 -7
View File
@@ -314,9 +314,9 @@ func (e *callExpr) eval(app *app, args []string) {
defer out.Close()
var path string
if len(app.nav.marks) != 0 {
marks := app.nav.currMarks()
path = strings.Join(marks, "\n")
if len(app.nav.selections) != 0 {
selections := app.nav.currSelections()
path = strings.Join(selections, "\n")
} else if curr, err := app.nav.currFile(); err == nil {
path = curr.path
} else {
@@ -354,14 +354,14 @@ func (e *callExpr) eval(app *app, args []string) {
app.ui.loadFileInfo(app.nav)
case "invert":
app.nav.invert()
case "unmark":
app.nav.unmark()
case "unselect":
app.nav.unselect()
case "copy":
if err := app.nav.save(true); err != nil {
app.ui.printf("copy: %s", err)
return
}
app.nav.unmark()
app.nav.unselect()
if err := sendRemote("send sync"); err != nil {
app.ui.printf("copy: %s", err)
}
@@ -370,7 +370,7 @@ func (e *callExpr) eval(app *app, args []string) {
app.ui.printf("cut: %s", err)
return
}
app.nav.unmark()
app.nav.unselect()
if err := sendRemote("send sync"); err != nil {
app.ui.printf("cut: %s", err)
}