mirror of
https://github.com/felixangell/phi.git
synced 2024-10-26 09:08:24 +03:00
added a makefile + let cursor flash in debug mode or when set
This commit is contained in:
parent
8fba85606e
commit
46c4fc6877
12
Makefile
Normal file
12
Makefile
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
.PHONY: all
|
||||||
|
|
||||||
|
build:
|
||||||
|
go build cmd/phi/main.go
|
||||||
|
|
||||||
|
exec:
|
||||||
|
./main
|
||||||
|
|
||||||
|
run:
|
||||||
|
go run cmd/phi/main.go
|
||||||
|
|
||||||
|
all: build exec
|
@ -1198,8 +1198,7 @@ func (b *Buffer) processInput(pred func(r int) bool) bool {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME for now this is only enabled in debug mode.
|
if b.cfg.Cursor.Flash || cfg.DebugMode {
|
||||||
if b.cfg.Cursor.Flash && cfg.DebugMode {
|
|
||||||
if time.Now().Sub(lastCursorDraw) >= time.Duration(b.cfg.Cursor.FlashRate)*time.Millisecond {
|
if time.Now().Sub(lastCursorDraw) >= time.Duration(b.cfg.Cursor.FlashRate)*time.Millisecond {
|
||||||
renderFlashingCursor = !renderFlashingCursor
|
renderFlashingCursor = !renderFlashingCursor
|
||||||
lastCursorDraw = time.Now()
|
lastCursorDraw = time.Now()
|
||||||
|
Loading…
Reference in New Issue
Block a user