Update cosmic-text, status line for additional ViEditor modes
This commit is contained in:
parent
02a093be0e
commit
12c8536d0c
2 changed files with 48 additions and 47 deletions
23
src/main.rs
23
src/main.rs
|
|
@ -893,18 +893,23 @@ impl cosmic::Application for App {
|
|||
Some(tab) => {
|
||||
tab_column =
|
||||
tab_column.push(text_box(&tab.editor, self.config.metrics()).padding(8));
|
||||
let status = match tab.editor.lock().unwrap().mode() {
|
||||
ViMode::Passthrough => {
|
||||
//TODO: status line
|
||||
String::new()
|
||||
}
|
||||
ViMode::Normal => {
|
||||
//TODO: status line
|
||||
String::new()
|
||||
}
|
||||
let status = match &tab.editor.lock().unwrap().parser().mode {
|
||||
ViMode::Normal => String::new(),
|
||||
ViMode::Insert => {
|
||||
format!("-- INSERT --")
|
||||
}
|
||||
ViMode::Extra(extra) => {
|
||||
format!("{}", extra)
|
||||
}
|
||||
ViMode::Replace => {
|
||||
format!("-- REPLACE --")
|
||||
}
|
||||
ViMode::Visual => {
|
||||
format!("-- VISUAL --")
|
||||
}
|
||||
ViMode::VisualLine => {
|
||||
format!("-- VISUAL LINE --")
|
||||
}
|
||||
ViMode::Command { value } => {
|
||||
format!(":{value}|")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue