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 83b1f98 commit 448c668
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,10 @@ impl Reedline {

let result = self.read_line_helper(prompt);

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

terminal::disable_raw_mode()?;

result
Expand Down Expand Up @@ -763,9 +767,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 448c668

Please sign in to comment.