fix capital letters not registering
This commit is contained in:
parent
15beff91b3
commit
b5b7022ee7
2 changed files with 8 additions and 3 deletions
|
@ -116,10 +116,15 @@ impl Editor {
|
||||||
KeyCode::Esc => self.active = false,
|
KeyCode::Esc => self.active = false,
|
||||||
KeyCode::Char(ch) => self.insert_char(ch),
|
KeyCode::Char(ch) => self.insert_char(ch),
|
||||||
KeyCode::Enter => self.insert_char('\n'),
|
KeyCode::Enter => self.insert_char('\n'),
|
||||||
|
KeyCode::Tab => self.insert_char('\t'),
|
||||||
KeyCode::Backspace => self.backspace(),
|
KeyCode::Backspace => self.backspace(),
|
||||||
KeyCode::Delete => self.delete(),
|
KeyCode::Delete => self.delete(),
|
||||||
_ => (),
|
_ => (),
|
||||||
},
|
},
|
||||||
|
KeyModifiers::SHIFT => match event.code {
|
||||||
|
KeyCode::Char(ch) => self.insert_char(ch.to_ascii_uppercase()),
|
||||||
|
_ => (),
|
||||||
|
},
|
||||||
KeyModifiers::CONTROL => match event.code {
|
KeyModifiers::CONTROL => match event.code {
|
||||||
KeyCode::Char('s') => self.save(),
|
KeyCode::Char('s') => self.save(),
|
||||||
KeyCode::Char('c') => self.copy(),
|
KeyCode::Char('c') => self.copy(),
|
||||||
|
|
|
@ -52,7 +52,7 @@ impl Navigator {
|
||||||
editors.push(editor);
|
editors.push(editor);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
editors.push(Editor::new_named(clipboard.clone(), arg))
|
editors.push(Editor::new_named(clipboard.clone(), arg));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if args.is_empty() {
|
if args.is_empty() {
|
||||||
|
@ -157,7 +157,7 @@ impl Navigator {
|
||||||
let i = self.selected - self.editors.len();
|
let i = self.selected - self.editors.len();
|
||||||
if i == 0 {
|
if i == 0 {
|
||||||
if let Some(parent) = self.path.parent() {
|
if let Some(parent) = self.path.parent() {
|
||||||
self.path = parent.to_owned()
|
self.path = parent.to_owned();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
let path = &self.files[i];
|
let path = &self.files[i];
|
||||||
|
@ -170,7 +170,7 @@ impl Navigator {
|
||||||
{
|
{
|
||||||
self.selected = self.editors.len();
|
self.selected = self.editors.len();
|
||||||
self.editors.push(editor);
|
self.editors.push(editor);
|
||||||
self.open_selected()
|
self.open_selected();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue