Improved --sync behavior

When --sync is provided, fzf will not render the interface until the
initial filtering and associated actions (bound to any of 'start',
'load', or 'result') are complete.
This commit is contained in:
Junegunn Choi
2024-06-17 00:07:27 +09:00
parent b8c01af0fc
commit e0ddb97ab4
4 changed files with 130 additions and 75 deletions

View File

@@ -339,9 +339,6 @@ func Run(opts *Options) (int, error) {
}
total = count
terminal.UpdateCount(total, !reading, value.(*string))
if opts.Sync {
terminal.UpdateList(PassMerger(&snapshot, opts.Tac, snapshotRevision), false)
}
if heightUnknown && !deferred {
determine(!reading)
}
@@ -429,7 +426,7 @@ func Run(opts *Options) (int, error) {
determine(val.final)
}
}
terminal.UpdateList(val, true)
terminal.UpdateList(val)
}
}
}