aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-04-06 10:45:14 +0000
committerBlaž Hrastnik2021-04-06 10:51:15 +0000
commit0e9ecccfc12f4972360b516bd56222894f315d58 (patch)
tree0a9444cfab3f072995f823037be7558fa4c41572 /helix-term/src
parent91462af546619740c93181b88a7908e481e6d6ab (diff)
clippy: Drop or-patterns for now because they're not on stable rust yet
Diffstat (limited to 'helix-term/src')
-rw-r--r--helix-term/src/commands.rs6
-rw-r--r--helix-term/src/ui/prompt.rs6
2 files changed, 8 insertions, 4 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index c3afbd92..4d9c24a0 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -821,15 +821,15 @@ pub fn command_mode(cx: &mut Context) {
let parts = input.split_ascii_whitespace().collect::<Vec<&str>>();
match *parts.as_slice() {
- ["q" | "quit"] => {
+ ["q"] | ["quit"] => {
editor.close(editor.view().id);
// editor.should_close = true,
}
- ["o" | "open", path] => {
+ ["o", path] | ["open", path] => {
use helix_view::editor::Action;
editor.open(path.into(), Action::Replace);
}
- ["w" | "write"] => {
+ ["w"] | ["write"] => {
// TODO: non-blocking via save() command
let id = editor.view().doc;
let doc = &mut editor.documents[id];
diff --git a/helix-term/src/ui/prompt.rs b/helix-term/src/ui/prompt.rs
index 3588853e..04108d79 100644
--- a/helix-term/src/ui/prompt.rs
+++ b/helix-term/src/ui/prompt.rs
@@ -182,7 +182,11 @@ impl Component for Prompt {
// char or shift char
KeyEvent {
code: KeyCode::Char(c),
- modifiers: KeyModifiers::NONE | KeyModifiers::SHIFT,
+ modifiers: KeyModifiers::NONE,
+ }
+ | KeyEvent {
+ code: KeyCode::Char(c),
+ modifiers: KeyModifiers::SHIFT,
} => {
self.insert_char(c);
(self.callback_fn)(cx.editor, &self.line, PromptEvent::Update);