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

Try to elide long completion based on user input. #12284

Merged
merged 2 commits into from May 9, 2020
Merged

Conversation

Carreau
Copy link
Member

@Carreau Carreau commented May 4, 2020

If what the user has typed is already in the completion and the
completion is really long, try to elide what the user has already typed
from the displayed text of the completion.

Keep the first 3 and last 3 of what is already present.

This will behave weirdly if all the completion have a common prefix as I
believe prompt toolkit will insert the common prefix (or do we?). I'll
have to check how to consider the common prefix as being typed.

If what the user has typed is already in the completion and the
completion is really long, try to elide what the user has already typed
from the displayed text of the completion.

Keep the first 3 and last 3 of what is already present.

This will behave weirdly if all the completion have a common prefix as I
believe prompt toolkit will insert the common prefix (or do we?). I'll
have to check how to consider the common prefix as being typed.
@Carreau
Copy link
Member Author

Carreau commented May 4, 2020

Example of usage for completing unicode:

Screen Shot 2020-05-04 at 16 35 39

Mostly when the match is super-short.
Ass type annotations,
run mypy on ptutils now.
@Carreau Carreau added this to the 7.15 milestone May 5, 2020
@Carreau Carreau merged commit 7994e30 into ipython:master May 9, 2020
2 checks passed
@Carreau Carreau deleted the de19 branch May 9, 2020
@Carreau Carreau restored the de19 branch May 9, 2020
meeseeksmachine pushed a commit to meeseeksmachine/ipython that referenced this issue May 9, 2020
@Carreau Carreau deleted the de19 branch May 9, 2020
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.

None yet

1 participant