aboutsummaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorPetter Rodhelind <petter.rodhelind@gmail.com>2021-03-06 20:14:06 +0100
committerPetter Rodhelind <petter.rodhelind@gmail.com>2021-03-06 20:14:06 +0100
commita0591e399d5228ce27a2ca55acb5376c2b76ccac (patch)
tree7a33238367ff49288c3b0cd627588e5119613ae6 /editor
parent816aa1dd19ca760a94bb7b9d54e768c6aa3af332 (diff)
downloadpoe-a0591e399d5228ce27a2ca55acb5376c2b76ccac.tar.gz
poe-a0591e399d5228ce27a2ca55acb5376c2b76ccac.tar.bz2
poe-a0591e399d5228ce27a2ca55acb5376c2b76ccac.zip
Manage columns in a sane way.HEADmasterdev
Diffstat (limited to 'editor')
-rw-r--r--editor/buffer.go4
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.