From 46c743727039d680533247c122d0527735d60870 Mon Sep 17 00:00:00 2001 From: Zachary Yedidia Date: Sun, 3 Dec 2017 17:19:51 -0500 Subject: [PATCH] Fix ViewType refactor --- cmd/micro/actions.go | 2 +- cmd/micro/view.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/micro/actions.go b/cmd/micro/actions.go index 566cd797..35c10738 100644 --- a/cmd/micro/actions.go +++ b/cmd/micro/actions.go @@ -941,7 +941,7 @@ func (v *View) Save(usePlugin bool) bool { return false } - if v.Type.scratch == true { + if v.Type.Scratch == true { // We can't save any view type with scratch set. eg help and log text return false } diff --git a/cmd/micro/view.go b/cmd/micro/view.go index 21712972..b8fa7093 100644 --- a/cmd/micro/view.go +++ b/cmd/micro/view.go @@ -463,7 +463,7 @@ func (v *View) ExecuteActions(actions []func(*View, bool) bool) bool { for _, action := range actions { readonlyBindingsResult := false funcName := ShortFuncName(action) - if v.Type.readonly == true { + if v.Type.Readonly == true { // check for readonly and if true only let key bindings get called if they do not change the contents. for _, readonlyBindings := range readonlyBindingsList { if strings.Contains(funcName, readonlyBindings) { @@ -566,7 +566,7 @@ func (v *View) HandleEvent(event tcell.Event) { } if !isBinding && e.Key() == tcell.KeyRune { // Check viewtype if readonly don't insert a rune (readonly help and log view etc.) - if v.Type.readonly == false { + if v.Type.Readonly == false { for _, c := range v.Buf.cursors { v.SetCursor(c) @@ -593,7 +593,7 @@ func (v *View) HandleEvent(event tcell.Event) { } case *tcell.EventPaste: // Check viewtype if readonly don't paste (readonly help and log view etc.) - if v.Type.readonly == false { + if v.Type.Readonly == false { if !PreActionCall("Paste", v) { break }