core.go
This file
Path
src/core.go
417 lines · 10.5 KiB · Go
Last changed by
Add --tmux option to replace fzf-tmux scriptJunegunn Choibefore adoption83b6033
History of this fileTake it
The walk stopped after 200 commits: lines older than d75bb5c point at it.
Deploying to master from @ junegunn/fzf@2671259fdb3094a5eac528f291c1fdadbcf9eda9 🚀junegunnbefore adoptiond75bb5c
lines 1–4why, one step back1// Package fzf implements fzf, a command-line fuzzy finder.2package fzf34import (Add --tmux option to replace fzf-tmux scriptJunegunn Choibefore adoption83b6033
line 5why, one step back5 "os"Fix streaming filter mode by not running reader callback concurrentlyJunegunn Choibefore adoption3acb4ca
line 6why, one step back6 "sync"Deploying to master from @ junegunn/fzf@2671259fdb3094a5eac528f291c1fdadbcf9eda9 🚀junegunnbefore adoptiond75bb5c
lines 7–21why, one step back7 "time"89 "github.com/junegunn/fzf/src/util"10)1112/*13Reader -> EvtReadFin14Reader -> EvtReadNew -> Matcher (restart)15Terminal -> EvtSearchNew:bool -> Matcher (restart)16Matcher -> EvtSearchProgress -> Terminal (update info)17Matcher -> EvtSearchFin -> Terminal (update list)18Matcher -> EvtHeader -> Terminal (update header)19*/2021// Run starts fzfRefactor the code so that fzf can be used as a library (#3769)Junegunn Choibefore adoptione8405f4
line 22why, one step back22func Run(opts *Options) (int, error) {Add --tmux option to replace fzf-tmux scriptJunegunn Choibefore adoption83b6033
lines 23–26why, one step back23 if opts.Tmux != nil && len(os.Getenv("TMUX")) > 0 {24 return runTmux(os.Args[1:], opts)25 }26Refactor the code so that fzf can be used as a library (#3769)Junegunn Choibefore adoptione8405f4
lines 27–30why, one step back27 if err := postProcessOptions(opts); err != nil {28 return ExitError, err29 }30Enable profiling options when 'pprof' tag is set (#2813)Charlie Viethbefore adoption3c877c5
lines 31–32why, one step back31 defer util.RunAtExitFuncs()32Refactor the code so that fzf can be used as a library (#3769)Junegunn Choibefore adoptione8405f4
lines 33–36why, one step back33 // Output channel given34 if opts.Output != nil {35 opts.Printer = func(str string) {36 opts.Output <- strDeploying to master from @ junegunn/fzf@2671259fdb3094a5eac528f291c1fdadbcf9eda9 🚀junegunnbefore adoptiond75bb5c
lines 37–39why, one step back37 }38 }39Refactor the code so that fzf can be used as a library (#3769)Junegunn Choibefore adoptione8405f4
lines 40–42why, one step back40 sort := opts.Sort > 041 sortCriteria = opts.Criteria42Deploying to master from @ junegunn/fzf@2671259fdb3094a5eac528f291c1fdadbcf9eda9 🚀junegunnbefore adoptiond75bb5c
lines 43–55why, one step back43 // Event channel44 eventBox := util.NewEventBox()4546 // ANSI code processor47 ansiProcessor := func(data []byte) (util.Chars, *[]ansiOffset) {48 return util.ToChars(data), nil49 }5051 var lineAnsiState, prevLineAnsiState *ansiState52 if opts.Ansi {53 if opts.Theme.Colored {54 ansiProcessor = func(data []byte) (util.Chars, *[]ansiOffset) {55 prevLineAnsiState = lineAnsiStateRefactor the code to remove global variablesJunegunn Choibefore adoption4bedd33
line 56why, one step back56 trimmed, offsets, newState := extractColor(byteString(data), lineAnsiState, nil)Deploying to master from @ junegunn/fzf@2671259fdb3094a5eac528f291c1fdadbcf9eda9 🚀junegunnbefore adoptiond75bb5c
line 57why, one step back57 lineAnsiState = newStateRefactor the code to remove global variablesJunegunn Choibefore adoption4bedd33
line 58why, one step back58 return util.ToChars(stringBytes(trimmed)), offsetsDeploying to master from @ junegunn/fzf@2671259fdb3094a5eac528f291c1fdadbcf9eda9 🚀junegunnbefore adoptiond75bb5c
lines 59–63why, one step back59 }60 } else {61 // When color is disabled but ansi option is given,62 // we simply strip out ANSI codes from the input63 ansiProcessor = func(data []byte) (util.Chars, *[]ansiOffset) {Refactor the code to remove global variablesJunegunn Choibefore adoption4bedd33
lines 64–65why, one step back64 trimmed, _, _ := extractColor(byteString(data), nil, nil)65 return util.ToChars(stringBytes(trimmed)), nilDeploying to master from @ junegunn/fzf@2671259fdb3094a5eac528f291c1fdadbcf9eda9 🚀junegunnbefore adoptiond75bb5c
lines 66–76why, one step back66 }67 }68 }6970 // Chunk list71 var chunkList *ChunkList72 var itemIndex int3273 header := make([]string, 0, opts.HeaderLines)74 if len(opts.WithNth) == 0 {75 chunkList = NewChunkList(func(item *Item, data []byte) bool {76 if len(header) < opts.HeaderLines {Refactor the code to remove global variablesJunegunn Choibefore adoption4bedd33
line 77why, one step back77 header = append(header, byteString(data))Deploying to master from @ junegunn/fzf@2671259fdb3094a5eac528f291c1fdadbcf9eda9 🚀junegunnbefore adoptiond75bb5c
lines 78–87why, one step back78 eventBox.Set(EvtHeader, header)79 return false80 }81 item.text, item.colors = ansiProcessor(data)82 item.text.Index = itemIndex83 itemIndex++84 return true85 })86 } else {87 chunkList = NewChunkList(func(item *Item, data []byte) bool {Refactor the code to remove global variablesJunegunn Choibefore adoption4bedd33
line 88why, one step back88 tokens := Tokenize(byteString(data), opts.Delimiter)Deploying to master from @ junegunn/fzf@2671259fdb3094a5eac528f291c1fdadbcf9eda9 🚀junegunnbefore adoptiond75bb5c
lines 89–111why, one step back89 if opts.Ansi && opts.Theme.Colored && len(tokens) > 1 {90 var ansiState *ansiState91 if prevLineAnsiState != nil {92 ansiStateDup := *prevLineAnsiState93 ansiState = &ansiStateDup94 }95 for _, token := range tokens {96 prevAnsiState := ansiState97 _, _, ansiState = extractColor(token.text.ToString(), ansiState, nil)98 if prevAnsiState != nil {99 token.text.Prepend("\x1b[m" + prevAnsiState.ToString())100 } else {101 token.text.Prepend("\x1b[m")102 }103 }104 }105 trans := Transform(tokens, opts.WithNth)106 transformed := joinTokens(trans)107 if len(header) < opts.HeaderLines {108 header = append(header, transformed)109 eventBox.Set(EvtHeader, header)110 return false111 }Refactor the code to remove global variablesJunegunn Choibefore adoption4bedd33
line 112why, one step back112 item.text, item.colors = ansiProcessor(stringBytes(transformed))Deploying to master from @ junegunn/fzf@2671259fdb3094a5eac528f291c1fdadbcf9eda9 🚀junegunnbefore adoptiond75bb5c
lines 113–120why, one step back113 item.text.TrimTrailingWhitespaces()114 item.text.Index = itemIndex115 item.origText = &data116 itemIndex++117 return true118 })119 }120Add --with-shell for shelling out with different command and flags (#3746)Junegunn Choibefore adoptiona4391ae
lines 121–123why, one step back121 // Process executor122 executor := util.NewExecutor(opts.WithShell)123Deploying to master from @ junegunn/fzf@2671259fdb3094a5eac528f291c1fdadbcf9eda9 🚀junegunnbefore adoptiond75bb5c
lines 124–129why, one step back124 // Reader125 streamingFilter := opts.Filter != nil && !sort && !opts.Tac && !opts.Sync126 var reader *Reader127 if !streamingFilter {128 reader = NewReader(func(data []byte) bool {129 return chunkList.Push(data)Add --with-shell for shelling out with different command and flags (#3746)Junegunn Choibefore adoptiona4391ae
line 130why, one step back130 }, eventBox, executor, opts.ReadZero, opts.Filter == nil)Refactor the code so that fzf can be used as a library (#3769)Junegunn Choibefore adoptione8405f4
line 131why, one step back131 go reader.ReadSource(opts.Input, opts.WalkerRoot, opts.WalkerOpts, opts.WalkerSkip)Deploying to master from @ junegunn/fzf@2671259fdb3094a5eac528f291c1fdadbcf9eda9 🚀junegunnbefore adoptiond75bb5c
lines 132–146why, one step back132 }133134 // Matcher135 forward := true136 withPos := false137 for idx := len(opts.Criteria) - 1; idx > 0; idx-- {138 switch opts.Criteria[idx] {139 case byChunk:140 withPos = true141 case byEnd:142 forward = false143 case byBegin:144 forward = true145 }146 }Refactor the code so that fzf can be used as a library (#3769)Junegunn Choibefore adoptione8405f4
lines 147–148why, one step back147 cache := NewChunkCache()148 patternCache := make(map[string]*Pattern)Deploying to master from @ junegunn/fzf@2671259fdb3094a5eac528f291c1fdadbcf9eda9 🚀junegunnbefore adoptiond75bb5c
line 149why, one step back149 patternBuilder := func(runes []rune) *Pattern {Refactor the code so that fzf can be used as a library (#3769)Junegunn Choibefore adoptione8405f4
line 150why, one step back150 return BuildPattern(cache, patternCache,Deploying to master from @ junegunn/fzf@2671259fdb3094a5eac528f291c1fdadbcf9eda9 🚀junegunnbefore adoptiond75bb5c
lines 151–155why, one step back151 opts.Fuzzy, opts.FuzzyAlgo, opts.Extended, opts.Case, opts.Normalize, forward, withPos,152 opts.Filter == nil, opts.Nth, opts.Delimiter, runes)153 }154 inputRevision := 0155 snapshotRevision := 0Refactor the code so that fzf can be used as a library (#3769)Junegunn Choibefore adoptione8405f4
line 156why, one step back156 matcher := NewMatcher(cache, patternBuilder, sort, opts.Tac, eventBox, inputRevision)Deploying to master from @ junegunn/fzf@2671259fdb3094a5eac528f291c1fdadbcf9eda9 🚀junegunnbefore adoptiond75bb5c
lines 157–169why, one step back157158 // Filtering mode159 if opts.Filter != nil {160 if opts.PrintQuery {161 opts.Printer(*opts.Filter)162 }163164 pattern := patternBuilder([]rune(*opts.Filter))165 matcher.sort = pattern.sortable166167 found := false168 if streamingFilter {169 slab := util.MakeSlab(slab16Size, slab32Size)Fix streaming filter mode by not running reader callback concurrentlyJunegunn Choibefore adoption3acb4ca
line 170why, one step back170 mutex := sync.Mutex{}Deploying to master from @ junegunn/fzf@2671259fdb3094a5eac528f291c1fdadbcf9eda9 🚀junegunnbefore adoptiond75bb5c
lines 171–174why, one step back171 reader := NewReader(172 func(runes []byte) bool {173 item := Item{}174 if chunkList.trans(&item, runes) {Fix streaming filter mode by not running reader callback concurrentlyJunegunn Choibefore adoption3acb4ca
line 175why, one step back175 mutex.Lock()Deploying to master from @ junegunn/fzf@2671259fdb3094a5eac528f291c1fdadbcf9eda9 🚀junegunnbefore adoptiond75bb5c
lines 176–179why, one step back176 if result, _, _ := pattern.MatchItem(&item, false, slab); result != nil {177 opts.Printer(item.text.ToString())178 found = true179 }Fix streaming filter mode by not running reader callback concurrentlyJunegunn Choibefore adoption3acb4ca
line 180why, one step back180 mutex.Unlock()Deploying to master from @ junegunn/fzf@2671259fdb3094a5eac528f291c1fdadbcf9eda9 🚀junegunnbefore adoptiond75bb5c
lines 181–182why, one step back181 }182 return falseAdd --with-shell for shelling out with different command and flags (#3746)Junegunn Choibefore adoptiona4391ae
line 183why, one step back183 }, eventBox, executor, opts.ReadZero, false)Refactor the code so that fzf can be used as a library (#3769)Junegunn Choibefore adoptione8405f4
line 184why, one step back184 reader.ReadSource(opts.Input, opts.WalkerRoot, opts.WalkerOpts, opts.WalkerSkip)Deploying to master from @ junegunn/fzf@2671259fdb3094a5eac528f291c1fdadbcf9eda9 🚀junegunnbefore adoptiond75bb5c
lines 185–198why, one step back185 } else {186 eventBox.Unwatch(EvtReadNew)187 eventBox.WaitFor(EvtReadFin)188189 snapshot, _ := chunkList.Snapshot()190 merger, _ := matcher.scan(MatchRequest{191 chunks: snapshot,192 pattern: pattern})193 for i := 0; i < merger.Length(); i++ {194 opts.Printer(merger.Get(i).item.AsString(opts.Ansi))195 found = true196 }197 }198 if found {Refactor the code so that fzf can be used as a library (#3769)Junegunn Choibefore adoptione8405f4
line 199why, one step back199 return ExitOk, nilDeploying to master from @ junegunn/fzf@2671259fdb3094a5eac528f291c1fdadbcf9eda9 🚀junegunnbefore adoptiond75bb5c
line 200why, one step back200 }Refactor the code so that fzf can be used as a library (#3769)Junegunn Choibefore adoptione8405f4
line 201why, one step back201 return ExitNoMatch, nilDeploying to master from @ junegunn/fzf@2671259fdb3094a5eac528f291c1fdadbcf9eda9 🚀junegunnbefore adoptiond75bb5c
lines 202–211why, one step back202 }203204 // Synchronous search205 if opts.Sync {206 eventBox.Unwatch(EvtReadNew)207 eventBox.WaitFor(EvtReadFin)208 }209210 // Go interactive211 go matcher.Loop()Refactor the code so that fzf can be used as a library (#3769)Junegunn Choibefore adoptione8405f4
line 212why, one step back212 defer matcher.Stop()Deploying to master from @ junegunn/fzf@2671259fdb3094a5eac528f291c1fdadbcf9eda9 🚀junegunnbefore adoptiond75bb5c
lines 213–214why, one step back213214 // Terminal I/ORefactor the code so that fzf can be used as a library (#3769)Junegunn Choibefore adoptione8405f4
lines 215–218why, one step back215 terminal, err := NewTerminal(opts, eventBox, executor)216 if err != nil {217 return ExitError, err218 }Deploying to master from @ junegunn/fzf@2671259fdb3094a5eac528f291c1fdadbcf9eda9 🚀junegunnbefore adoptiond75bb5c
lines 219–234why, one step back219 maxFit := 0 // Maximum number of items that can fit on screen220 padHeight := 0221 heightUnknown := opts.Height.auto222 if heightUnknown {223 maxFit, padHeight = terminal.MaxFitAndPad()224 }225 deferred := opts.Select1 || opts.Exit0226 go terminal.Loop()227 if !deferred && !heightUnknown {228 // Start right away229 terminal.startChan <- fitpad{-1, -1}230 }231232 // Event coordination233 reading := true234 ticks := 0Refactor the code to remove global variablesJunegunn Choibefore adoption4bedd33
line 235why, one step back235 var nextCommand *commandSpecExport FZF_* variables to 'reload' process as wellJunegunn Choibefore adoption5e6788c
line 236why, one step back236 var nextEnviron []stringDeploying to master from @ junegunn/fzf@2671259fdb3094a5eac528f291c1fdadbcf9eda9 🚀junegunnbefore adoptiond75bb5c
lines 237–255why, one step back237 eventBox.Watch(EvtReadNew)238 total := 0239 query := []rune{}240 determine := func(final bool) {241 if heightUnknown {242 if total >= maxFit || final {243 deferred = false244 heightUnknown = false245 terminal.startChan <- fitpad{util.Min(total, maxFit), padHeight}246 }247 } else if deferred {248 deferred = false249 terminal.startChan <- fitpad{-1, -1}250 }251 }252253 useSnapshot := false254 var snapshot []*Chunk255 var count intRefactor the code to remove global variablesJunegunn Choibefore adoption4bedd33
line 256why, one step back256 restart := func(command commandSpec, environ []string) {Deploying to master from @ junegunn/fzf@2671259fdb3094a5eac528f291c1fdadbcf9eda9 🚀junegunnbefore adoptiond75bb5c
lines 257–261why, one step back257 reading = true258 chunkList.Clear()259 itemIndex = 0260 inputRevision++261 header = make([]string, 0, opts.HeaderLines)Export FZF_* variables to 'reload' process as wellJunegunn Choibefore adoption5e6788c
line 262why, one step back262 go reader.restart(command, environ)Deploying to master from @ junegunn/fzf@2671259fdb3094a5eac528f291c1fdadbcf9eda9 🚀junegunnbefore adoptiond75bb5c
line 263why, one step back263 }Refactor the code so that fzf can be used as a library (#3769)Junegunn Choibefore adoptione8405f4
lines 264–266why, one step back264265 exitCode := ExitOk266 stop := falseDeploying to master from @ junegunn/fzf@2671259fdb3094a5eac528f291c1fdadbcf9eda9 🚀junegunnbefore adoptiond75bb5c
lines 267–271why, one step back267 for {268 delay := true269 ticks++270 input := func() []rune {271 paused, input := terminal.Input()Fix reload and reload-sync behaviorsJunegunn Choibefore adoption008fb9d
line 272why, one step back272 if !paused {Deploying to master from @ junegunn/fzf@2671259fdb3094a5eac528f291c1fdadbcf9eda9 🚀junegunnbefore adoptiond75bb5c
lines 273–286why, one step back273 query = input274 }275 return query276 }277 eventBox.Wait(func(events *util.Events) {278 if _, fin := (*events)[EvtReadFin]; fin {279 delete(*events, EvtReadNew)280 }281 for evt, value := range *events {282 switch evt {283 case EvtQuit:284 if reading {285 reader.terminate()286 }Refactor the code so that fzf can be used as a library (#3769)Junegunn Choibefore adoptione8405f4
lines 287–291why, one step back287 quitSignal := value.(quitSignal)288 exitCode = quitSignal.code289 err = quitSignal.err290 stop = true291 returnDeploying to master from @ junegunn/fzf@2671259fdb3094a5eac528f291c1fdadbcf9eda9 🚀junegunnbefore adoptiond75bb5c
lines 292–293why, one step back292 case EvtReadNew, EvtReadFin:293 if evt == EvtReadFin && nextCommand != nil {Export FZF_* variables to 'reload' process as wellJunegunn Choibefore adoption5e6788c
line 294why, one step back294 restart(*nextCommand, nextEnviron)Deploying to master from @ junegunn/fzf@2671259fdb3094a5eac528f291c1fdadbcf9eda9 🚀junegunnbefore adoptiond75bb5c
line 295why, one step back295 nextCommand = nilExport FZF_* variables to 'reload' process as wellJunegunn Choibefore adoption5e6788c
line 296why, one step back296 nextEnviron = nilDeploying to master from @ junegunn/fzf@2671259fdb3094a5eac528f291c1fdadbcf9eda9 🚀junegunnbefore adoptiond75bb5c
lines 297–304why, one step back297 break298 } else {299 reading = reading && evt == EvtReadNew300 }301 if useSnapshot && evt == EvtReadFin {302 useSnapshot = false303 }304 if !useSnapshot {Fix reload and reload-sync behaviorsJunegunn Choibefore adoption008fb9d
lines 305–307why, one step back305 if snapshotRevision != inputRevision {306 query = []rune{}307 }Deploying to master from @ junegunn/fzf@2671259fdb3094a5eac528f291c1fdadbcf9eda9 🚀junegunnbefore adoptiond75bb5c
lines 308–313why, one step back308 snapshot, count = chunkList.Snapshot()309 snapshotRevision = inputRevision310 }311 total = count312 terminal.UpdateCount(total, !reading, value.(*string))313 if opts.Sync {Remove invalid 'result' event when using --sync optionJunegunn Choibefore adoptiond8bfb67
line 314why, one step back314 terminal.UpdateList(PassMerger(&snapshot, opts.Tac, snapshotRevision), false)Deploying to master from @ junegunn/fzf@2671259fdb3094a5eac528f291c1fdadbcf9eda9 🚀junegunnbefore adoptiond75bb5c
lines 315–321why, one step back315 }316 if heightUnknown && !deferred {317 determine(!reading)318 }319 matcher.Reset(snapshot, input(), false, !reading, sort, snapshotRevision)320321 case EvtSearchNew:Refactor the code to remove global variablesJunegunn Choibefore adoption4bedd33
line 322why, one step back322 var command *commandSpecExport FZF_* variables to 'reload' process as wellJunegunn Choibefore adoption5e6788c
line 323why, one step back323 var environ []stringDeploying to master from @ junegunn/fzf@2671259fdb3094a5eac528f291c1fdadbcf9eda9 🚀junegunnbefore adoptiond75bb5c
lines 324–328why, one step back324 var changed bool325 switch val := value.(type) {326 case searchRequest:327 sort = val.sort328 command = val.commandExport FZF_* variables to 'reload' process as wellJunegunn Choibefore adoption5e6788c
line 329why, one step back329 environ = val.environDeploying to master from @ junegunn/fzf@2671259fdb3094a5eac528f291c1fdadbcf9eda9 🚀junegunnbefore adoptiond75bb5c
lines 330–338why, one step back330 changed = val.changed331 if command != nil {332 useSnapshot = val.sync333 }334 }335 if command != nil {336 if reading {337 reader.terminate()338 nextCommand = commandExport FZF_* variables to 'reload' process as wellJunegunn Choibefore adoption5e6788c
line 339why, one step back339 nextEnviron = environDeploying to master from @ junegunn/fzf@2671259fdb3094a5eac528f291c1fdadbcf9eda9 🚀junegunnbefore adoptiond75bb5c
line 340why, one step back340 } else {Export FZF_* variables to 'reload' process as wellJunegunn Choibefore adoption5e6788c
line 341why, one step back341 restart(*command, environ)Deploying to master from @ junegunn/fzf@2671259fdb3094a5eac528f291c1fdadbcf9eda9 🚀junegunnbefore adoptiond75bb5c
lines 342–347why, one step back342 }343 }344 if !changed {345 break346 }347 if !useSnapshot {Fix reload and reload-sync behaviorsJunegunn Choibefore adoption008fb9d
line 348why, one step back348 newSnapshot, newCount := chunkList.Snapshot()Deploying to master from @ junegunn/fzf@2671259fdb3094a5eac528f291c1fdadbcf9eda9 🚀junegunnbefore adoptiond75bb5c
lines 349–350why, one step back349 // We want to avoid showing empty list when reload is triggered350 // and the query string is changed at the same time i.e. command != nil && changedFix reload and reload-sync behaviorsJunegunn Choibefore adoption008fb9d
lines 351–354why, one step back351 if command == nil || newCount > 0 {352 if snapshotRevision != inputRevision {353 query = []rune{}354 }Deploying to master from @ junegunn/fzf@2671259fdb3094a5eac528f291c1fdadbcf9eda9 🚀junegunnbefore adoptiond75bb5c
lines 355–390why, one step back355 snapshot = newSnapshot356 snapshotRevision = inputRevision357 }358 }359 matcher.Reset(snapshot, input(), true, !reading, sort, snapshotRevision)360 delay = false361362 case EvtSearchProgress:363 switch val := value.(type) {364 case float32:365 terminal.UpdateProgress(val)366 }367368 case EvtHeader:369 headerPadded := make([]string, opts.HeaderLines)370 copy(headerPadded, value.([]string))371 terminal.UpdateHeader(headerPadded)372373 case EvtSearchFin:374 switch val := value.(type) {375 case *Merger:376 if deferred {377 count := val.Length()378 if opts.Select1 && count > 1 || opts.Exit0 && !opts.Select1 && count > 0 {379 determine(val.final)380 } else if val.final {381 if opts.Exit0 && count == 0 || opts.Select1 && count == 1 {382 if opts.PrintQuery {383 opts.Printer(opts.Query)384 }385 if len(opts.Expect) > 0 {386 opts.Printer("")387 }388 for i := 0; i < count; i++ {389 opts.Printer(val.Get(i).item.AsString(opts.Ansi))390 }Refactor the code so that fzf can be used as a library (#3769)Junegunn Choibefore adoptione8405f4
lines 391–392why, one step back391 if count == 0 {392 exitCode = ExitNoMatchDeploying to master from @ junegunn/fzf@2671259fdb3094a5eac528f291c1fdadbcf9eda9 🚀junegunnbefore adoptiond75bb5c
line 393why, one step back393 }Refactor the code so that fzf can be used as a library (#3769)Junegunn Choibefore adoptione8405f4
lines 394–395why, one step back394 stop = true395 returnDeploying to master from @ junegunn/fzf@2671259fdb3094a5eac528f291c1fdadbcf9eda9 🚀junegunnbefore adoptiond75bb5c
lines 396–399why, one step back396 }397 determine(val.final)398 }399 }Remove invalid 'result' event when using --sync optionJunegunn Choibefore adoptiond8bfb67
line 400why, one step back400 terminal.UpdateList(val, true)Deploying to master from @ junegunn/fzf@2671259fdb3094a5eac528f291c1fdadbcf9eda9 🚀junegunnbefore adoptiond75bb5c
lines 401–405why, one step back401 }402 }403 }404 events.Clear()405 })Refactor the code so that fzf can be used as a library (#3769)Junegunn Choibefore adoptione8405f4
lines 406–408why, one step back406 if stop {407 break408 }Deploying to master from @ junegunn/fzf@2671259fdb3094a5eac528f291c1fdadbcf9eda9 🚀junegunnbefore adoptiond75bb5c
lines 409–415why, one step back409 if delay && reading {410 dur := util.DurWithin(411 time.Duration(ticks)*coordinatorDelayStep,412 0, coordinatorDelayMax)413 time.Sleep(dur)414 }415 }Refactor the code so that fzf can be used as a library (#3769)Junegunn Choibefore adoptione8405f4
line 416why, one step back416 return exitCode, errDeploying to master from @ junegunn/fzf@2671259fdb3094a5eac528f291c1fdadbcf9eda9 🚀junegunnbefore adoptiond75bb5c
line 417why, one step back417}