Skip to content

Commit

Permalink
reset the style of cursor on finish
Browse files Browse the repository at this point in the history
  • Loading branch information
ynqa committed Oct 5, 2024
1 parent 000ea72 commit c64fe84
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions promkit/src/preset/readline/keymap.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use crossterm::style::ContentStyle;

use crate::{
crossterm::event::{Event, KeyCode, KeyEvent, KeyEventKind, KeyEventState, KeyModifiers},
listbox::Listbox,
Expand Down Expand Up @@ -63,6 +65,9 @@ pub fn default(
if let Some(ref mut history) = &mut text_editor_after_mut.history {
history.insert(text);
}
// For representing the end of the prompt,
// reset the style of the cursor to default.
text_editor_after_mut.active_char_style = ContentStyle::default();
Ok(PromptSignal::Quit)
} else {
Ok(PromptSignal::Continue)
Expand Down

0 comments on commit c64fe84

Please sign in to comment.