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

REPL prefix search: add ^x "pass through" key #36173

Merged
merged 2 commits into from
Jul 2, 2020
Merged

Conversation

rfourquet
Copy link
Member

This fix the following bug:

  1. press "Ctrl-P" to go to previous history entry, through "prefix history search"
  2. "^x"

Then the Julia session is exited ("^x" is a prefix keyboard shortcut, e.g. "^x^x" does "exchange-mark-and-cursor").
This PR is a very similar to #33805.

This is not a complete solution: if you have a 3-key combo as a keyboard shortcut, e.g. "^x^lb", then the session will again terminate. Then we could add "^x**" => "*", as a "pass-through", but

  1. the problem is not solved for bigger n-keys combos
  2. "^x^x" doesn't work well anymore: after pressing "^x^x", the REPL first waits for a third key before processing, which is not wanted.

So let's assume 3+-key combos are not used very much.
I'm really looking forward to fixing this "pass through" problem in a general way...

@rfourquet rfourquet added bugfix This change fixes an existing bug REPL Julia's REPL (Read Eval Print Loop) labels Jun 6, 2020
@StefanKarpinski
Copy link
Member

Who would be good to review this?

@rfourquet
Copy link
Member Author

Who would be good to review this?

Maybe @vtjnash who IIRC made the change that makes Julia exit instead of getting a runtime "REPL keymap" error?

@Keno
Copy link
Member

Keno commented Jun 18, 2020

These kind of subtle behavior changes need a REPL test, otherwise, they're basically guaranteed to regress.

@rfourquet
Copy link
Member Author

I'm quite guilty as I knew tests were missing, it's just frustrating with REPL fixes to make the fix in 5 min and spend an order of magnitude more time trying to sort out how to test these things :-/
Anyway, that's done now, and I will mark this for backport-1.5.

@rfourquet
Copy link
Member Author

I will merge in a couple of days if no objection.

@rfourquet rfourquet merged commit 0960c9a into master Jul 2, 2020
@rfourquet rfourquet deleted the repl/fix-ctrl-x branch July 2, 2020 17:56
KristofferC pushed a commit that referenced this pull request Jul 8, 2020
@KristofferC KristofferC mentioned this pull request Jul 8, 2020
13 tasks
simeonschaub pushed a commit to simeonschaub/julia that referenced this pull request Aug 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This change fixes an existing bug REPL Julia's REPL (Read Eval Print Loop)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants