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

Feature Request: Autocomplete should move to last visible item with UP on the first item #3546

Closed
osergioabreu opened this issue Aug 22, 2023 · 9 comments

Comments

@osergioabreu
Copy link

osergioabreu commented Aug 22, 2023

When autocomplete list opens with limited items, sometimes it is faster go to the last item moving UP instead of rolling all itens to down as now we are FORCED...
It you are at the first item and moves up, it should go to the LAST item (as a cicle) the same in the LAST item if we press DOWN must return to first, as a cicle.

@osergioabreu osergioabreu changed the title Feature Request: Autocomplete list firts should move to last moving UP Feature Request: Autocomplete should move to last item moving UP from the first item Aug 22, 2023
@elextr
Copy link
Member

elextr commented Aug 22, 2023

Not sure its a good idea because when the list of possible items is longer than the menu a wraparound is to the last of an unknown number of items. There is no way of knowing if its shorter or not.

The cursor behaviour in the autocomplete menu is provided by the Scintilla editing widget, so it has to be added there, not to Geany.

@osergioabreu
Copy link
Author

osergioabreu commented Aug 23, 2023

Every good editor has this behaviour, for instance Netbeans and Microsoft VCode. It is mandatory for a best editor.
Lets supose you have 10 items in autocomplete list. Pressing UP just once you would go to the last item.
Now Geany FORCES us to press 10 times to pass by ALL ITENS down!!! What is more efficient?
If we go to the LAST item you can return to the first independent of the size of the list, only pressing ONCE DOWN arrow, as it will wraps again the boundary, to first.

@elextr
Copy link
Member

elextr commented Aug 23, 2023

As I said, the behaviour of the autocomplete list movement is determined by the Scintilla editing widget. This is a separate project and any change in the behaviour must be added there first and will be included in Geany when the appropriate version of Scintilla is included in Geany.

@elextr
Copy link
Member

elextr commented Aug 23, 2023

Other than scope based autocomplete, if you only have six items in the autocomplete list you are very lucky in my experience. Large amounts of "junk" options is very common making the list of options longer than the displayed menu. So if a user moves up they would wrap to an unknown item past the end of the displayed list.

Because of this a heroic heuristic has been added to try to order C/C++ autocompletes with the most likely first eg local variables, and that will be available at the next release of Geany. So the most likely should be at or near the top.

But if Scintilla adds the wraparound thats ok, nobody has to scroll up, I just don't think it will be very useful in real life.

@osergioabreu
Copy link
Author

osergioabreu commented Aug 23, 2023

It seems you didn't understand the point.
The example of a short autocomplete with 6 items is when you type part of a VARIABLE NAME that you are creating and press Ctrl+Space bar

@elextr
Copy link
Member

elextr commented Aug 23, 2023

It is inappropriate to abuse anybody contributing to any project no matter what their status in the project. An opinion is a personal position based on the contributors experience, just because that does not agree with your personal opinion is not an excuse for abuse.

If you had read my posts with less emotion you would have seen that they do not say that the option should not be added, in fact I have pointed out the mechanism by which that has to happen, adding it to Scintilla first, and pointing out that will make it available when that version of Scintilla is imported.

type part of a VARIABLE NAME that you are creating.

Geany can't distinguish what type of name is being typed, it will show variables, functions, types, enumerations etc, anything with the same prefix. And if the autocomplete word option is on then the list will be all words in the document with the currently typed prefix. In my experience that tends to result in long lists. Your experience may differ.

@osergioabreu
Copy link
Author

osergioabreu commented Aug 23, 2023

Even Microsoft VCode uses this behavior.
I found abusive too you saying that this feature may not be important or useful.
To have oppinios is ok, but knowing when to express them is also important.
Here is an environment for colaboration, we expect some good will or at least a neutral actitud from the community.
Read your comments and you will see that all the time you suggest it is not important, nor useful.
For me, after trying many good editors, for years, I found that it is fundamental !

@elextr
Copy link
Member

elextr commented Aug 23, 2023

tends to result in long lists

The maximum size of the autocomplete menu is set (default 10) but the list can be longer than that, so you can't see the end items. That is the issue with long lists, because a wrap will be blind to items that are not visible yet.

I am aware that VScode behaves this way, and when I accidentally scroll up too far and wrap it switches to some item that is not visible in the menu and is usually some rubbish system library thing that has no relationship to what I am typing, contributing to my opinion that wrapping autocompletes, especially prioritised ones, may not be very useful in unscoped situations.

I already said that the list is likely to be shorter in scoped autocompletes, but those tend to resolve to one very quickly in my experience, yours may differ.

As stated it is my opinion that it will not be very useful, it is entirely reasonable to state an opinion, even if it disagrees with yours. Accepting that others may have differing opinions is part of open source software development where people have significantly differing experiences and use-cases. Even someone with your limited experience (half of mine) is listened to and engaged with, even if disagreed with.

from the staff

There are no staff here, Geany is an entirely volunteer project, people contribute what they wish to use their own personal "spare" time for.

For me, after trying many good editors, for years, I found that it is fundamental !

Since all Geany contributors are volunteers they are likely to contribute what they find is important to them, irrespective of how important it is to you. So far nobody has found it so fundamental in either the Geany or Scintilla projects that they have contributed it.

But if it is so important to you then you can create a pull request to Scintilla to add the capability as I posted above, and then everybody can use it if they find it useful. At no time have I said it should not be implemented, just that I am of the opinion that it will not be very useful.

@osergioabreu osergioabreu changed the title Feature Request: Autocomplete should move to last item moving UP from the first item Feature Request: Autocomplete should move to last visible item with UP on the first item Aug 23, 2023
@elextr
Copy link
Member

elextr commented Aug 27, 2023

Scintilla 1495 marked as won't implement. This can be reopened if that changes.

@elextr elextr closed this as completed Aug 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants