aboutsummaryrefslogtreecommitdiff
path: root/ui/tcell
diff options
context:
space:
mode:
authorPetter Rodhelind <petter.rodhelind@gmail.com>2021-03-03 16:24:03 +0100
committerPetter Rodhelind <petter.rodhelind@gmail.com>2021-03-03 16:24:03 +0100
commiteddb1c60371d2b2e10bd1952d68a6dec00545e39 (patch)
tree68810f2a87ef4b7da4a892d0cd1796d5e2c57e46 /ui/tcell
parent38d7be1d7ea7cf9025f6facc1404e3e65c56a9cc (diff)
downloadpoe-eddb1c60371d2b2e10bd1952d68a6dec00545e39.tar.gz
poe-eddb1c60371d2b2e10bd1952d68a6dec00545e39.tar.bz2
poe-eddb1c60371d2b2e10bd1952d68a6dec00545e39.zip
Manage initial loading of buffers in UI.
Diffstat (limited to 'ui/tcell')
-rw-r--r--ui/tcell/tcell.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/ui/tcell/tcell.go b/ui/tcell/tcell.go
index c905704..bdd3b0e 100644
--- a/ui/tcell/tcell.go
+++ b/ui/tcell/tcell.go
@@ -33,6 +33,11 @@ type Tcell struct{}
func (t *Tcell) Init(e editor.Editor) error {
ed = e
+
+ if ed.Len() == 0 {
+ ed.LoadBuffers([]string{"."})
+ }
+
if err := initScreen(); err != nil {
return err
}