Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix moving with arrow keys in prompt #1070

Merged
merged 1 commit into from
Nov 11, 2021

Conversation

ath3
Copy link
Contributor

@ath3 ath3 commented Nov 11, 2021

No description provided.

@@ -430,8 +430,8 @@ impl Component for Prompt {
}
alt!('b') | alt!(Left) => self.move_cursor(Movement::BackwardWord(1)),
alt!('f') | alt!(Right) => self.move_cursor(Movement::ForwardWord(1)),
ctrl!('b') | ctrl!(Left) => self.move_cursor(Movement::BackwardChar(1)),
ctrl!('f') | ctrl!(Right) => self.move_cursor(Movement::ForwardChar(1)),
ctrl!('b') | ctrl!(Left) | key!(Left) => self.move_cursor(Movement::BackwardChar(1)),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should replace the ctrl!() mapping with key!()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! I was thinking about that, but i didnt do it because it was working before with ctrl too, so i wasnt sure if that was intentional.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah looks like it was a bug when transcribing the events: efc2b4c#diff-910b0deb36d6f016258fafae83ea994d924230f49ab46dce71ff326a4a06e3efL456

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see, key!() only matches the key with no modifiers, hmm. I think it's okay in this case

@archseer archseer merged commit c7cb752 into helix-editor:master Nov 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants