From 6cf6857602d8352b3f04b8f31e41eb7525add010 Mon Sep 17 00:00:00 2001 From: Zachary Yedidia Date: Mon, 22 May 2017 11:21:17 -0400 Subject: [PATCH] Add comment --- cmd/micro/actions_linux.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/micro/actions_linux.go b/cmd/micro/actions_linux.go index 01649f7d..f119eaa2 100644 --- a/cmd/micro/actions_linux.go +++ b/cmd/micro/actions_linux.go @@ -2,6 +2,9 @@ package main import "syscall" +// Suspend sends micro to the background. This is the same as pressing CtrlZ in most unix programs. +// This only works on linux and has no default binding. +// This code was adapted from the suspend code in nsf/godit func (v *View) Suspend(usePlugin bool) bool { if usePlugin && !PreActionCall("Suspend", v) { return false @@ -19,7 +22,7 @@ func (v *View) Suspend(usePlugin bool) bool { tid := syscall.Gettid() err := syscall.Tgkill(pid, tid, syscall.SIGSTOP) if err != nil { - panic(err) + TermMessage(err) } if !screenWasNil {