aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/tcell/tcell.go14
-rw-r--r--ui/tcell/window.go2
2 files changed, 15 insertions, 1 deletions
diff --git a/ui/tcell/tcell.go b/ui/tcell/tcell.go
index 20b59d5..ad27bd5 100644
--- a/ui/tcell/tcell.go
+++ b/ui/tcell/tcell.go
@@ -138,6 +138,7 @@ func initCommands() {
"New": CmdNew,
"Newcol": CmdNewcol,
"Del": CmdDel,
+ "Get": CmdGet,
"Exit": CmdExit,
}
}
@@ -266,6 +267,19 @@ func CmdNewcol() {
CmdNew()
}
+func CmdGet() {
+ screen.Clear()
+ wins := AllWindows()
+ for _, win := range wins {
+ if win.tagline.focused {
+ q0, q1 := win.body.text.Dot()
+ win.body.text.Destroy()
+ win.body.text.ReadFile()
+ win.body.text.SetDot(q0, q1)
+ }
+ }
+}
+
func CmdExit() {
exit := true
wins := AllWindows()
diff --git a/ui/tcell/window.go b/ui/tcell/window.go
index ba4220c..86f9ce4 100644
--- a/ui/tcell/window.go
+++ b/ui/tcell/window.go
@@ -41,7 +41,7 @@ func NewWindow(id int64) *Window {
},
}
- fmt.Fprintf(win.tagline, "%s Del ",
+ fmt.Fprintf(win.tagline, "%s Del Get ",
win.TagName(),
)