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

Autocompletion bugs #276

Open
fkv1 opened this issue Sep 15, 2022 · 1 comment
Open

Autocompletion bugs #276

fkv1 opened this issue Sep 15, 2022 · 1 comment
Assignees

Comments

@fkv1
Copy link

fkv1 commented Sep 15, 2022

Autocompletion of key names has 3 serious bugs:

  1. Key names are suggested that are already used on the object.

  2. When I misspell a key name and then correct it, the misspelled name is still used for autocompletion. It should be removed from the set of suggested keys as soon as there are no more instances. A more general and useful approach is to always suggest the tag with the most instances (in the download/edit layers) of all that start with the typed in string.

  3. When I type in some characters and the autocomplete suggestion is not what I want, I use the cursor-down or cursur-up keys to switch to another suggestion. (E.g. I type in "addr", and the autocomplete suggestion is "addr:city", but I want "addr:housenumber".) But the typed in characters are ignored and in fact overwritten by a random other suggestion. This is wrong. Cursor up/down should cycle through matching key names only, and they should be displayed in the same way as the initial suggestion, i.e. the suggested continuation (the characters behind the typed in characters) should be preselected (usually with blue background, but this may depend on system settings) so they can be manually overridden by simply typing in more characters.

@Krakonos
Copy link
Member

Krakonos commented Sep 9, 2024

Well, I did a bit of digging and instead of solutions, i found more:

  1. Loading a saved document does not restore the autocompletion.

The issue in in how the autocompletion is handled. I'm not sure of the reasons for the optimization (it's way before my time), there is a separate index for autocompletion purposes. I think I'll just try to rewrite it to walk all the objects and gather the tags. It might not be that bad - and if it is, I can definitely walk all the objects currently displayed and only do autocompletion on these. That might be an OK compromise, as I agree that the current state is pretty much broken.

Anyway, see PR #305 for a potential fix to 3. It does duplicate the combobox function a little bit but I think it's OK.

@Krakonos Krakonos self-assigned this Sep 17, 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