mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-22 09:26:19 +04:00
Resolve conflicts between prompt/picker bindings (#1792)
Currently, the picker's re-using a few bindings which are also present in the prompt. This causes some editing behaviours to not function on the picker. **Ctrl + k** and **Ctrl + j** This should kill till the end of the line on prompt, but is overridden by the picker for scrolling. Since there are redundancies (`Ctrl + p`, `Ctrl + n`), we can remove it from picker. **Ctrl + f** and **Ctrl + b** This are used by the prompt for back/forward movement. We could modify it to be Ctrl + d and Ctrl + u, to match the `vim` behaviour.
This commit is contained in:
parent
ef91b6500c
commit
5d61631507
@ -331,10 +331,10 @@ # Picker
|
||||
|
||||
| Key | Description |
|
||||
| ----- | ------------- |
|
||||
| `Up`, `Ctrl-k`, `Ctrl-p` | Previous entry |
|
||||
| `PageUp`, `Ctrl-b` | Page up |
|
||||
| `Down`, `Ctrl-j`, `Ctrl-n` | Next entry |
|
||||
| `PageDown`, `Ctrl-f` | Page down |
|
||||
| `Up`, `Ctrl-p` | Previous entry |
|
||||
| `PageUp`, `Ctrl-u` | Page up |
|
||||
| `Down`, `Ctrl-n` | Next entry |
|
||||
| `PageDown`, `Ctrl-d` | Page down |
|
||||
| `Home` | Go to first entry |
|
||||
| `End` | Go to last entry |
|
||||
| `Ctrl-space` | Filter options |
|
||||
|
@ -498,16 +498,16 @@ fn handle_event(&mut self, event: Event, cx: &mut Context) -> EventResult {
|
||||
})));
|
||||
|
||||
match key_event.into() {
|
||||
shift!(Tab) | key!(Up) | ctrl!('p') | ctrl!('k') => {
|
||||
shift!(Tab) | key!(Up) | ctrl!('p') => {
|
||||
self.move_by(1, Direction::Backward);
|
||||
}
|
||||
key!(Tab) | key!(Down) | ctrl!('n') | ctrl!('j') => {
|
||||
key!(Tab) | key!(Down) | ctrl!('n') => {
|
||||
self.move_by(1, Direction::Forward);
|
||||
}
|
||||
key!(PageDown) | ctrl!('f') => {
|
||||
key!(PageDown) | ctrl!('d') => {
|
||||
self.page_down();
|
||||
}
|
||||
key!(PageUp) | ctrl!('b') => {
|
||||
key!(PageUp) | ctrl!('u') => {
|
||||
self.page_up();
|
||||
}
|
||||
key!(Home) => {
|
||||
|
Loading…
Reference in New Issue
Block a user