tightened up some logic with indenting and joining lines

added more linebuf tests

extracted all verb match arms into private methods on LineBuf
This commit is contained in:
2026-03-13 19:24:30 -04:00
parent 13227943c6
commit 307386ffc6
43 changed files with 3783 additions and 3408 deletions

View File

@@ -13,10 +13,10 @@ impl ViInsert {
pub fn new() -> Self {
Self::default()
}
pub fn record_cmd(mut self, cmd: ViCmd) -> Self {
self.cmds.push(cmd);
self
}
pub fn record_cmd(mut self, cmd: ViCmd) -> Self {
self.cmds.push(cmd);
self
}
pub fn with_count(mut self, repeat_count: u16) -> Self {
self.repeat_count = repeat_count;
self
@@ -65,10 +65,12 @@ impl ViMode for ViInsert {
raw_seq: String::new(),
flags: Default::default(),
}),
E(K::Verbatim(seq), _) => {
self.pending_cmd.set_verb(VerbCmd(1, Verb::Insert(seq.to_string())));
self.register_and_return()
}
E(K::Verbatim(seq), _) => {
self
.pending_cmd
.set_verb(VerbCmd(1, Verb::Insert(seq.to_string())));
self.register_and_return()
}
E(K::Char('W'), M::CTRL) => {
self.pending_cmd.set_verb(VerbCmd(1, Verb::Delete));
self.pending_cmd.set_motion(MotionCmd(