Add suspend for linux only

This commit is contained in:
Zachary Yedidia
2017-05-21 10:44:33 -04:00
parent a70fb9db7d
commit d1e70b5abf
3 changed files with 10 additions and 2 deletions

View File

@@ -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) {

View File

@@ -0,0 +1,9 @@
// +build !linux
package main
func (v *View) Suspend(usePlugin bool) bool {
TermError("Suspend is only supported on Linux")
return false
}

View File

@@ -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,