implemented proper cursor placement for line editor

This commit is contained in:
2025-05-27 03:32:08 -04:00
parent 1e3715d353
commit 0e95e006d8
4 changed files with 84 additions and 19 deletions

View File

@@ -100,6 +100,9 @@ impl ViCmd {
pub fn is_undo_op(&self) -> bool {
self.verb.as_ref().is_some_and(|v| matches!(v.1, Verb::Undo | Verb::Redo))
}
pub fn is_line_motion(&self) -> bool {
self.motion.as_ref().is_some_and(|m| matches!(m.1, Motion::LineUp | Motion::LineDown))
}
pub fn is_mode_transition(&self) -> bool {
self.verb.as_ref().is_some_and(|v| {
matches!(v.1,