Skip to content

Commit

Permalink
move pop key enhancement flags beside other mode change
Browse files Browse the repository at this point in the history
  • Loading branch information
Abdillah committed Jul 24, 2023
1 parent c7d9a7d commit b7bc8ef
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,11 @@ impl Reedline {

#[cfg(not(target_os = "windows"))]
self.disable_bracketed_paste()?;

if self.use_kitty_protocol {
let _ = execute!(io::stdout(), event::PopKeyboardEnhancementFlags);
}

terminal::disable_raw_mode()?;
result
}
Expand Down Expand Up @@ -764,9 +769,6 @@ impl Reedline {
for event in reedline_events.drain(..) {
match self.handle_event(prompt, event)? {
EventStatus::Exits(signal) => {
if self.use_kitty_protocol {
let _ = execute!(io::stdout(), event::PopKeyboardEnhancementFlags);
}
// Move the cursor below the input area, for external commands or new read_line call
self.painter.move_cursor_to_end()?;
return Ok(signal);
Expand Down

0 comments on commit b7bc8ef

Please sign in to comment.