mirror of
https://github.com/felixangell/phi.git
synced 2024-09-11 15:55:25 +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
|
n.focusedBuff = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
prevBuff.Buff.SetFocus(false)
|
if prevBuff != nil {
|
||||||
|
prevBuff.Buff.SetFocus(false)
|
||||||
|
}
|
||||||
|
|
||||||
if buffPane, ok := n.buffers[n.focusedBuff]; ok {
|
if buffPane, ok := n.buffers[n.focusedBuff]; ok {
|
||||||
buffPane.Buff.SetFocus(true)
|
buffPane.Buff.SetFocus(true)
|
||||||
}
|
}
|
||||||
|
10
main.go
10
main.go
@ -7,7 +7,6 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"runtime"
|
"runtime"
|
||||||
"runtime/pprof"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/felixangell/phi/cfg"
|
"github.com/felixangell/phi/cfg"
|
||||||
@ -68,15 +67,6 @@ func (n *PhiEditor) render(ctx *strife.Renderer) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
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()
|
config := cfg.Setup()
|
||||||
|
|
||||||
ww, wh := 1280, 720
|
ww, wh := 1280, 720
|
||||||
|
Loading…
Reference in New Issue
Block a user