diff options
author | Petter Rodhelind <petter.rodhelind@gmail.com> | 2021-03-06 20:14:06 +0100 |
---|---|---|
committer | Petter Rodhelind <petter.rodhelind@gmail.com> | 2021-03-06 20:14:06 +0100 |
commit | a0591e399d5228ce27a2ca55acb5376c2b76ccac (patch) | |
tree | 7a33238367ff49288c3b0cd627588e5119613ae6 /editor | |
parent | 816aa1dd19ca760a94bb7b9d54e768c6aa3af332 (diff) | |
download | poe-a0591e399d5228ce27a2ca55acb5376c2b76ccac.tar.gz poe-a0591e399d5228ce27a2ca55acb5376c2b76ccac.tar.bz2 poe-a0591e399d5228ce27a2ca55acb5376c2b76ccac.zip |
Diffstat (limited to 'editor')
-rw-r--r-- | editor/buffer.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/editor/buffer.go b/editor/buffer.go index 9b7444a..702528c 100644 --- a/editor/buffer.go +++ b/editor/buffer.go @@ -253,7 +253,9 @@ func (b *Buffer) Destroy() { b.buf.Destroy() b.SetDot(0, 0) b.dirty = false - b.file.read = false + if b.file != nil { + b.file.read = false + } } // Len returns the number of bytes in buffer. |