Skip to content

Commit

Permalink
move pop key enhancement flags just before loop exit
Browse files Browse the repository at this point in the history
  • Loading branch information
Abdillah committed Jul 21, 2023
1 parent 625cc00 commit 8cc8c4e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,6 @@ impl Drop for Reedline {
if self.bracket_paste_enabled {
let _ = execute!(io::stdout(), DisableBracketedPaste);
}
if self.use_kitty_protocol {
let _ = execute!(io::stdout(), event::PopKeyboardEnhancementFlags);
}
}
}

Expand Down Expand Up @@ -765,6 +762,9 @@ 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 8cc8c4e

Please sign in to comment.