mirror of
https://github.com/Hopiu/micro.git
synced 2026-03-31 05:10:26 +00:00
parent
3e3cdfc5b5
commit
35a9245c5d
1 changed files with 3 additions and 2 deletions
|
|
@ -525,7 +525,8 @@ func (v *View) ExecuteActions(actions []func(*View, bool) bool) bool {
|
|||
for _, action := range actions {
|
||||
readonlyBindingsResult := false
|
||||
funcName := ShortFuncName(action)
|
||||
if v.Type.Readonly == true {
|
||||
curv := CurView()
|
||||
if curv.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) {
|
||||
|
|
@ -535,7 +536,7 @@ func (v *View) ExecuteActions(actions []func(*View, bool) bool) bool {
|
|||
}
|
||||
if !readonlyBindingsResult {
|
||||
// call the key binding
|
||||
relocate = action(v, true) || relocate
|
||||
relocate = action(curv, true) || relocate
|
||||
// Macro
|
||||
if funcName != "ToggleMacro" && funcName != "PlayMacro" {
|
||||
if recordingMacro {
|
||||
|
|
|
|||
Loading…
Reference in a new issue