Skip to content

non-blocking completions in reedline#1093

Open
philocalyst wants to merge 3 commits into
nushell:mainfrom
philocalyst:ex
Open

non-blocking completions in reedline#1093
philocalyst wants to merge 3 commits into
nushell:mainfrom
philocalyst:ex

Conversation

@philocalyst
Copy link
Copy Markdown

related to the respective nushell change.

Adds primitives for non-blocking completions.

Comment thread src/engine.rs
Comment thread src/engine.rs
Comment thread src/engine.rs

// When a background completion finishes, re-populate the active
// menu so results appear without waiting for another keypress.
if self.completer.check_pending() {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could move the

let completer_pending = self.completer.has_pending();

up here and then gate it with:

if completer_pending && self.completer.check_pending() {...}

and reuse it in needs_polling.

This was the gating I was thinking of.
For both to default to false its not a deal breaker but it is cleaner this way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants