Kill running preview process after 500ms when focus has changed

Close #1383
Close #1384
This commit is contained in:
Junegunn Choi
2018-09-27 15:27:08 +09:00
parent 27c40dc6b0
commit 0d748a0699
5 changed files with 82 additions and 18 deletions

View File

@@ -22,10 +22,11 @@ const (
readerPollIntervalMax = 50 * time.Millisecond
// Terminal
initialDelay = 20 * time.Millisecond
initialDelayTac = 100 * time.Millisecond
spinnerDuration = 200 * time.Millisecond
maxPatternLength = 300
initialDelay = 20 * time.Millisecond
initialDelayTac = 100 * time.Millisecond
spinnerDuration = 200 * time.Millisecond
previewCancelWait = 500 * time.Millisecond
maxPatternLength = 300
// Matcher
numPartitionsMultiplier = 8
@@ -76,6 +77,7 @@ const (
)
const (
exitCancel = -1
exitOk = 0
exitNoMatch = 1
exitError = 2