Skip to content

Commit

Permalink
add Cmd::Refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
sujiacong committed Sep 10, 2023
1 parent 2b9e85d commit 0442bdc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ pub fn execute<H: Helper>(
Cmd::Newline => {
s.edit_insert('\n', 1)?;
}
Cmd::Refresh => {
s.refresh_line()?;
}
Cmd::AcceptLine | Cmd::AcceptOrInsertLine { .. } => {
let validation_result = s.validate()?;
let valid = validation_result.is_valid();
Expand Down
2 changes: 2 additions & 0 deletions src/keymap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ pub enum Cmd {
NextHistory,
/// No action
Noop,
/// Refresh
Refresh,
/// vi-replace
Overwrite(char),
/// previous-history
Expand Down

0 comments on commit 0442bdc

Please sign in to comment.