added a makefile + let cursor flash in debug mode or when set

This commit is contained in:
Felix Angell 2021-01-10 12:56:50 +00:00
parent 8fba85606e
commit 46c4fc6877
2 changed files with 13 additions and 2 deletions

12
Makefile Normal file
View 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

View File

@ -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 {
renderFlashingCursor = !renderFlashingCursor
lastCursorDraw = time.Now()