diff options
Diffstat (limited to 'ui/tcell/tcell.go')
-rw-r--r-- | ui/tcell/tcell.go | 14 |
1 files changed, 14 insertions, 0 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() |