in progress working on aborting operators on unhandled editor input

This commit is contained in:
Keith Simmons 2022-05-23 11:04:26 -07:00
parent 61f0daa5c5
commit 11569a869a
3 changed files with 21 additions and 7 deletions

View file

@ -47,6 +47,13 @@ impl VimState {
!matches!(self.mode, Mode::Insert)
}
pub fn clip_at_line_end(&self) -> bool {
match self.mode {
Mode::Insert | Mode::Visual | Mode::VisualLine => false,
_ => true,
}
}
pub fn empty_selections_only(&self) -> bool {
self.mode != Mode::Visual && self.mode != Mode::VisualLine
}