Add initial vim mode mode switching
Co-authored-by: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
ccc276da7a
commit
bb9b36dccd
16 changed files with 683 additions and 49 deletions
|
@ -224,15 +224,19 @@ impl Keystroke {
|
|||
key: key.unwrap(),
|
||||
})
|
||||
}
|
||||
|
||||
pub fn modified(&self) -> bool {
|
||||
self.ctrl || self.alt || self.shift || self.cmd
|
||||
}
|
||||
}
|
||||
|
||||
impl Context {
|
||||
pub fn extend(&mut self, other: Context) {
|
||||
for v in other.set {
|
||||
self.set.insert(v);
|
||||
pub fn extend(&mut self, other: &Context) {
|
||||
for v in &other.set {
|
||||
self.set.insert(v.clone());
|
||||
}
|
||||
for (k, v) in other.map {
|
||||
self.map.insert(k, v);
|
||||
for (k, v) in &other.map {
|
||||
self.map.insert(k.clone(), v.clone());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue