mirror of
https://github.com/Hopiu/micro.git
synced 2026-04-10 09:31:00 +00:00
Add comment
This commit is contained in:
parent
97e2fb1288
commit
6cf6857602
1 changed files with 4 additions and 1 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue