mirror of
https://github.com/felixangell/phi.git
synced 2024-08-16 19:20:21 +03:00
remove pprof stuff; avoid seg fault
This commit is contained in:
parent
7da654bbbb
commit
4e03b841a8
@ -111,7 +111,10 @@ func (n *View) ChangeFocus(dir int) {
|
||||
n.focusedBuff = 0
|
||||
}
|
||||
|
||||
prevBuff.Buff.SetFocus(false)
|
||||
if prevBuff != nil {
|
||||
prevBuff.Buff.SetFocus(false)
|
||||
}
|
||||
|
||||
if buffPane, ok := n.buffers[n.focusedBuff]; ok {
|
||||
buffPane.Buff.SetFocus(true)
|
||||
}
|
||||
|
10
main.go
10
main.go
@ -7,7 +7,6 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"runtime/pprof"
|
||||
"time"
|
||||
|
||||
"github.com/felixangell/phi/cfg"
|
||||
@ -68,15 +67,6 @@ func (n *PhiEditor) render(ctx *strife.Renderer) {
|
||||
}
|
||||
|
||||
func main() {
|
||||
f, err := os.Create("cpu.prof")
|
||||
if err != nil {
|
||||
log.Fatal("could not create CPU profile: ", err)
|
||||
}
|
||||
if err := pprof.StartCPUProfile(f); err != nil {
|
||||
log.Fatal("could not start CPU profile: ", err)
|
||||
}
|
||||
defer pprof.StopCPUProfile()
|
||||
|
||||
config := cfg.Setup()
|
||||
|
||||
ww, wh := 1280, 720
|
||||
|
Loading…
Reference in New Issue
Block a user