Use methods on view instead of functions for bindings

This commit is contained in:
Zachary Yedidia
2016-04-24 18:32:18 -04:00
parent 20ab7a44ab
commit 0ee6be3d0f
3 changed files with 65 additions and 65 deletions

View File

@@ -103,7 +103,7 @@ func HandleCommand(input string, view *View) {
os.Exit(0)
}
case "save":
Save(view)
view.Save()
case "replace":
r := regexp.MustCompile(`"[^"\\]*(?:\\.[^"\\]*)*"|[^\s]*`)
replaceCmd := r.FindAllString(strings.Join(args, " "), -1)