diff --git a/src/editor.rs b/src/editor.rs index 64e48ba..b0fefaa 100644 --- a/src/editor.rs +++ b/src/editor.rs @@ -116,10 +116,15 @@ impl Editor { KeyCode::Esc => self.active = false, KeyCode::Char(ch) => self.insert_char(ch), KeyCode::Enter => self.insert_char('\n'), + KeyCode::Tab => self.insert_char('\t'), KeyCode::Backspace => self.backspace(), KeyCode::Delete => self.delete(), _ => (), }, + KeyModifiers::SHIFT => match event.code { + KeyCode::Char(ch) => self.insert_char(ch.to_ascii_uppercase()), + _ => (), + }, KeyModifiers::CONTROL => match event.code { KeyCode::Char('s') => self.save(), KeyCode::Char('c') => self.copy(), diff --git a/src/main.rs b/src/main.rs index 56287a7..3f39909 100644 --- a/src/main.rs +++ b/src/main.rs @@ -52,7 +52,7 @@ impl Navigator { editors.push(editor); } } else { - editors.push(Editor::new_named(clipboard.clone(), arg)) + editors.push(Editor::new_named(clipboard.clone(), arg)); } } if args.is_empty() { @@ -157,7 +157,7 @@ impl Navigator { let i = self.selected - self.editors.len(); if i == 0 { if let Some(parent) = self.path.parent() { - self.path = parent.to_owned() + self.path = parent.to_owned(); } } else { let path = &self.files[i]; @@ -170,7 +170,7 @@ impl Navigator { { self.selected = self.editors.len(); self.editors.push(editor); - self.open_selected() + self.open_selected(); } } }