mirror of
https://github.com/nushell/nushell
synced 2024-12-28 22:13:10 +00:00
use add_exit_callback, update to rezural/nushell which contains add_exit_callback, and contains updated keybindings (#3121)
This commit is contained in:
parent
1d1ec4727a
commit
e4a8db56f9
2 changed files with 4 additions and 8 deletions
|
@ -62,7 +62,7 @@ itertools = "0.10.0"
|
||||||
lazy_static = "1.*"
|
lazy_static = "1.*"
|
||||||
log = "0.4.14"
|
log = "0.4.14"
|
||||||
meval = "0.2.0"
|
meval = "0.2.0"
|
||||||
minus = { optional = true, features = ["async_std_lib", "search"], git = "https://github.com/rezural/minus", branch = "add-finished-callback" }
|
minus = { optional = true, features = ["async_std_lib", "search"], git = "https://github.com/rezural/minus", branch = "nushell" }
|
||||||
num-bigint = { version = "0.3.1", features = ["serde"] }
|
num-bigint = { version = "0.3.1", features = ["serde"] }
|
||||||
num-format = { version = "0.4.0", features = ["with-num-bigint"] }
|
num-format = { version = "0.4.0", features = ["with-num-bigint"] }
|
||||||
num-traits = "0.2.14"
|
num-traits = "0.2.14"
|
||||||
|
|
|
@ -210,13 +210,9 @@ async fn table(
|
||||||
// This is called when the pager finishes, to indicate to the
|
// This is called when the pager finishes, to indicate to the
|
||||||
// while loop below to finish, in case of long running InputStream consumer
|
// while loop below to finish, in case of long running InputStream consumer
|
||||||
// that doesnt finish by the time the user quits out of the pager
|
// that doesnt finish by the time the user quits out of the pager
|
||||||
pager
|
pager.lock().await.add_exit_callback(move || {
|
||||||
.lock()
|
finished_within_callback.store(true, Ordering::Relaxed);
|
||||||
.await
|
});
|
||||||
.on_finished_callbacks
|
|
||||||
.push(Box::new(move || {
|
|
||||||
finished_within_callback.store(true, Ordering::Relaxed);
|
|
||||||
}));
|
|
||||||
}
|
}
|
||||||
while !finished.clone().load(Ordering::Relaxed) {
|
while !finished.clone().load(Ordering::Relaxed) {
|
||||||
let mut new_input: VecDeque<Value> = VecDeque::new();
|
let mut new_input: VecDeque<Value> = VecDeque::new();
|
||||||
|
|
Loading…
Reference in a new issue