]> git.lizzy.rs Git - micro.git/commitdiff
check viewtype before saving and if scratch is true then do not save
authortommy <tommy.shem1@googlemail.com>
Mon, 15 May 2017 19:00:58 +0000 (20:00 +0100)
committertommy <tommy.shem1@googlemail.com>
Mon, 15 May 2017 19:00:58 +0000 (20:00 +0100)
cmd/micro/actions.go

index 5f64c39ba1af2cc05807dad8dbbe051c41976a73..a4aab0165bfa15e971f6a9d12a1f97f5c949898d 100644 (file)
@@ -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