ViEditor: redraw when passthrough mode changed
This commit is contained in:
parent
7855dce09d
commit
ca35e1f429
1 changed files with 7 additions and 4 deletions
|
|
@ -60,10 +60,13 @@ impl<'a> ViEditor<'a> {
|
||||||
|
|
||||||
/// Set passthrough mode (true will turn off vi features)
|
/// Set passthrough mode (true will turn off vi features)
|
||||||
pub fn set_passthrough(&mut self, passthrough: bool) {
|
pub fn set_passthrough(&mut self, passthrough: bool) {
|
||||||
if passthrough {
|
if passthrough != (self.mode == ViMode::Passthrough) {
|
||||||
self.mode = ViMode::Passthrough;
|
if passthrough {
|
||||||
} else {
|
self.mode = ViMode::Passthrough;
|
||||||
self.mode = ViMode::Normal;
|
} else {
|
||||||
|
self.mode = ViMode::Normal;
|
||||||
|
}
|
||||||
|
self.buffer_mut().set_redraw(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue