Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: immediately execute command #882

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
dbg++
  • Loading branch information
mrdgo committed Feb 11, 2025
commit 5f38c62f7fb79fed4546a0712adb164dd2836357
4 changes: 3 additions & 1 deletion src/engine.rs
Original file line number Diff line number Diff line change
@@ -756,6 +756,7 @@ impl Reedline {
events.push(crossterm::event::read()?);
}

println!("Pre second read");
// If we believe there's text pasting or resizing going on, batch
// more events at the cost of a slight delay.
if events.len() > EVENTS_THRESHOLD
@@ -765,6 +766,7 @@ impl Reedline {
events.push(crossterm::event::read()?);
}
}
println!("Post second read");

// Convert `Event` into `ReedlineEvent`. Also, fuse consecutive
// `ReedlineEvent::EditCommand` into one. Also, if there're multiple
@@ -787,8 +789,8 @@ impl Reedline {
}
}
}
println!("Checking and pushing Submit");
if immediately_execute {
println!("Reedline: pushing submit!");
reedline_events.push(ReedlineEvent::Submit);
}
if !edits.is_empty() {