Open an empty buffer if user opened a directory

Fixes #216
This commit is contained in:
Zachary Yedidia
2016-08-29 09:01:54 -04:00
parent 00e385b871
commit 6ce8fe3ce1

View File

@@ -93,7 +93,8 @@ func LoadInput() []*Buffer {
input, err = ioutil.ReadFile(filename)
if err != nil {
TermMessage(err)
continue
input = []byte{}
filename = ""
}
}
// If the file didn't exist, input will be empty, and we'll open an empty buffer