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

Tab autocompletion of yinputline shows misleading results #297

Closed
Code7R opened this issue Sep 16, 2018 · 2 comments
Closed

Tab autocompletion of yinputline shows misleading results #297

Code7R opened this issue Sep 16, 2018 · 2 comments
Assignees
Milestone

Comments

@Code7R
Copy link
Collaborator

Code7R commented Sep 16, 2018

The current behavior of autocompletion action is weird. On success, it display the input as marked. On multiple option, it does the same. On failure, it does not indicate anything.

I have a vague idea on how to make it better.

a) rewrite globit.c in true C++ to get rid of the GOTO hell, and to collect output of multiple glob() rounds

b) indicate error as color change of the input line. Maybe red background? Or red font? Anyone having good arguments?

c) indicate multiple options by displaying them behind the cursor, with darker font (or lighter? Or just an average color, mean value of background and font?), maybe highlighting the first deviating letter after the length of entered prefix string with some color. Orange?

@Code7R Code7R added this to the 1.4.4 milestone Sep 16, 2018
Code7R added a commit that referenced this issue Sep 30, 2018
And some related refactoring, less nesting and pointless value passing.
Also not interpreting directories as final match.

Addressing part of #297, a proposal displaying solution is yet to come.
@gijsbers
Copy link
Collaborator

b) Maybe draw in inverse colors for half a second?
c) Maybe a choice of possible deviating letters like tint|<Tab> -> tint|[23],
where the choice [23] is selected and overwritten.

Code7R added a commit that referenced this issue Oct 20, 2024
@Code7R
Copy link
Collaborator Author

Code7R commented Oct 26, 2024

Instead of inverse colors, I decided to use the existing Tooltip and show the alternatives line by line, while using a Ellipsis to separate the prefix and the potential candidates. Tried spaces and [] and | but ... still looked best.

The implementation is not perfect, maybe globit code should be reimplemented in plain C++ after all to have easier and more precise information collection.

@Code7R Code7R self-assigned this Oct 26, 2024
Code7R added a commit that referenced this issue Oct 27, 2024
For #297

This is still not a final solution, globit_best's API is too limited,
too complicated to interact, and fails to handle a specific usecase
("gvim" vs. "gvimdiff").
@Code7R Code7R closed this as completed in 4ea94db Oct 27, 2024
Code7R added a commit that referenced this issue Oct 27, 2024
Code7R added a commit that referenced this issue Oct 27, 2024
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

No branches or pull requests

2 participants