diff --git a/cmd/micro/actions.go b/cmd/micro/actions.go index 05f3bd20..a4aab016 100644 --- a/cmd/micro/actions.go +++ b/cmd/micro/actions.go @@ -837,8 +837,6 @@ func (v *View) Find(usePlugin bool) bool { return true } -func (v *View) Suspend(usePlugin bool) bool { return false } - // FindNext searches forwards for the last used search term func (v *View) FindNext(usePlugin bool) bool { if usePlugin && !PreActionCall("FindNext", v) { diff --git a/cmd/micro/actions_other.go b/cmd/micro/actions_other.go new file mode 100644 index 00000000..3231a972 --- /dev/null +++ b/cmd/micro/actions_other.go @@ -0,0 +1,9 @@ +// +build !linux + +package main + +func (v *View) Suspend(usePlugin bool) bool { + TermError("Suspend is only supported on Linux") + + return false +} diff --git a/cmd/micro/bindings.go b/cmd/micro/bindings.go index 128912c7..fc44fbc7 100644 --- a/cmd/micro/bindings.go +++ b/cmd/micro/bindings.go @@ -90,6 +90,7 @@ var bindingActions = map[string]func(*View, bool) bool{ "HSplit": (*View).HSplitBinding, "ToggleMacro": (*View).ToggleMacro, "PlayMacro": (*View).PlayMacro, + "Suspend": (*View).Suspend, // This was changed to InsertNewline but I don't want to break backwards compatibility "InsertEnter": (*View).InsertNewline,