Skip to content
Myr

constants.go

This file

Path

src/constants.go

77 lines · 1.7 KiB · Go

Last changed by

Not known.

History of this file

Take it

1package fzf23import (4	"math"5	"time"67	"github.com/junegunn/fzf/src/util"8)910const (11	// Core12	coordinatorDelayMax  time.Duration = 100 * time.Millisecond13	coordinatorDelayStep time.Duration = 10 * time.Millisecond1415	// Reader16	readerBufferSize       = 64 * 102417	readerSlabSize         = 128 * 102418	readerPollIntervalMin  = 10 * time.Millisecond19	readerPollIntervalStep = 5 * time.Millisecond20	readerPollIntervalMax  = 50 * time.Millisecond2122	// Terminal23	initialDelay      = 20 * time.Millisecond24	initialDelayTac   = 100 * time.Millisecond25	spinnerDuration   = 100 * time.Millisecond26	previewCancelWait = 500 * time.Millisecond27	previewChunkDelay = 100 * time.Millisecond28	previewDelayed    = 500 * time.Millisecond29	maxPatternLength  = 100030	maxMulti          = math.MaxInt323132	// Background processes33	maxBgProcesses          = 3034	maxBgProcessesPerAction = 33536	// Matcher37	progressMinDuration = 200 * time.Millisecond3839	// Capacity of each chunk40	chunkSize     int = 102441	chunkBitWords     = (chunkSize + 63) / 644243	// Pre-allocated memory slices to minimize GC44	slab16Size int = 100 * 1024 // 200KB * 32 = 12.8MB45	slab32Size int = 2048       // 8KB * 32 = 256KB4647	// Do not cache results of low selectivity queries48	queryCacheMax int = chunkSize / 24950	// Not to cache mergers with large lists51	mergerCacheMax int = 1000005253	// History54	defaultHistoryMax int = 10005556	// Jump labels57	defaultJumpLabels string = "asdfghjklqwertyuiopzxcvbnm1234567890ASDFGHJKLQWERTYUIOPZXCVBNM`~;:,<.>/?'\"!@#$%^&*()[{]}-_=+"58)5960// fzf events61const (62	EvtReadNew util.EventType = iota63	EvtReadFin64	EvtSearchNew65	EvtSearchProgress66	EvtSearchFin67	EvtReady68	EvtQuit69)7071const (72	ExitOk        = 073	ExitNoMatch   = 174	ExitError     = 275	ExitBecome    = 12676	ExitInterrupt = 13077)