From a0591e399d5228ce27a2ca55acb5376c2b76ccac Mon Sep 17 00:00:00 2001 From: Petter Rodhelind Date: Sat, 6 Mar 2021 20:14:06 +0100 Subject: Manage columns in a sane way. --- editor/buffer.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'editor') 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. -- cgit v1.2.3