From d8dee90c10824c0c78e7078756ae9041c908a721 Mon Sep 17 00:00:00 2001 From: tommy Date: Mon, 15 May 2017 20:00:58 +0100 Subject: [PATCH] check viewtype before saving and if scratch is true then do not save --- cmd/micro/actions.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/micro/actions.go b/cmd/micro/actions.go index 5f64c39b..a4aab016 100644 --- a/cmd/micro/actions.go +++ b/cmd/micro/actions.go @@ -757,8 +757,8 @@ func (v *View) Save(usePlugin bool) bool { return false } - if v.Type == vtHelp { - // We can't save the help text + if v.Type.scratch == true { + // We can't save any view type with scratch set. eg help and log text return false } // If this is an empty buffer, ask for a filename