reedline/edit_mode/cursors.rs
1use crossterm::cursor::SetCursorStyle;
2
3/// Maps cursor shapes to each edit mode (emacs, vi normal & vi insert).
4/// If any of the fields is `None`, the cursor won't get changed by Reedline for that mode.
5#[derive(Default)]
6pub struct CursorConfig {
7 /// The cursor to be used when in vi insert mode
8 pub vi_insert: Option<SetCursorStyle>,
9 /// The cursor to be used when in vi normal mode
10 pub vi_normal: Option<SetCursorStyle>,
11 /// The cursor to be used when in emacs mode
12 pub emacs: Option<SetCursorStyle>,
13}