-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
add option to refresh auto-complete list instead of jumping #12783
Comments
I asked same question here #12495, but a separate issue is more advisable. Doing this as an option might be rational.
|
Or type Basically, the change would be like the behaviour of an automatic Esc press when typing another character which will recall the list. As a opt-in choice, the feature request seems reasonable. I have created a prototype to test the feature. Test ResultsEvents with each typing
Word completion works with recall too. The autocomplete might look smooth though it actually opens a new autocomplete list which closes the previous autocomplete list on each key press. So could be annoying to those who type fast and it might slow down the editor as the autocomplete functions are called with each key press to create the new list. Normally, if the autocomplete is active, the update function which calls the autocomplete functions returns early as a new list is not needed. As with changes comes positives and negatives.
The Function completion list can get huge. Makes me consider a filter the list items option. So added an option. The filter option allows the list to reduce in size. The 2 new checkbox options:
are saved and loaded from config.xml as This prototype makes "Function completion + filter" and "Word completion" subsets of "Function and word completion". To handle the options, the separate autocomplete function code has been merged into 1 function to eliminate code duplication. The old functions call the new function so that features like auto complete\insert word still work with the existing code. |
@mpheath thanks for addressing this request so quickly!
Interesting, I can't reproduce this behaviour - I actually used Either way, I also find it interesting that "words" and "functions" have to be refreshed/recalled/filtered separately. Would it make more sense to group these filtering options together? I'm picturing one Filter Auto-Complete List checkbox that enables the 2 other checkboxes when checked. |
Language tested with is ActionScript. Testing on unmodified v8.4.8 portable, I type I usually scroll the list and usually type Return to enter the selection. I use Tab in a console to autocomplete. Those are my habits.
"Words" are searched in the document by the current word so is always filtered. All the autocomplete options are filtered except for "Function completion" which just reads all keywords from the xml file which is stored in a variable named Changing the current autocomplete options could upset users, so adding some more options gives a choice. If the "Function completion" radio button is checked, then both "Filter the list items" and "Recall auto-completion on each input" are unchecked. That is as far as I wanna go to setting a default. I tried checking and unchecking based on what is checked and it gets complicated and may go against what the user wants. Checking "Function completion", unchecking "Filter the list items" and checking "Recall auto-completion on each input" I consider as a poor setting as recalling an autocomplete that does not filter the list seems unuseful as the list is not going to be reduced in size, though that is my opinion and I should not push my opinion on to others if I can avoid it. What you picture and what someone else pictures of a good default may not always line up. My decisions are for the good of all users, even if it negates my own personal preferences. If you consider that I made bad judgement, then let me know and I will reconsider. Thanks for the feedback. It looks like an interesting feature. |
Agreed, which is why I requested this as an option (though the section names in my original post are a bit misleading about that). The default settings should have filtering/recalling turned off to maintain consistency with previous versions.
Hmm, when I read your first response, I was under the impression that "recalling" and "filtering" were effectively the same thing, but for different portions of the list: If I understand things correctly, both processes reduce the visible Auto-Complete list when a new character is typed. If so, that's why I suggested grouping the options for "functions" and "words" together in the Preferences window; they do the same sort of thing to the same object, so it's reasonable to position the checkboxes side by side. This positioning would also ensure that the same terminology is used for the options; I think some users will be confused if we use two different terms to describe the same behaviour, but perhaps I'm misunderstanding the two workflows. Assuming that they are in fact the same, I personally like "filter" more than "refresh" or "recall". |
The options "filter" and "recall" are quite different operations. They can work together or separately. Recall code is like Your request is for "recall" (or as you described as "refresh"). The autocomplete cannot be refreshed using standard Scintilla functions, as in update the initial list in the same popup window. The next possible action is to recall the autocomplete to show a more filtered list based on the more characters typed. I chose the "recall" word as that is actually what it is does with recalling the autocomplete function to show a new autocomplete popup window. Each character typed will create a new popup window when the "recall" option is checked rather then use the existing autocomplete popup window. When If this layout is applied...
users might consider that "Filter the list items" applies to all the radio buttons as it is positioned in a global area. It only applies to the 1st radio button of "Function autocompletion". So, "Filter the list items" was moved to be right below "Function autocompletion" to bind with it. The "Filter the list items" checkbox is unchecked and disabled if "Function autocompletion" is not checked. This positioning of a checkbox under a radio button can be seen in the "New Document" section where the "UTF-8" radio button is followed by the "Apply to opened ANSI files" checkbox. This is where I copied the amount of pixels for the checkbox indentation. This is the current layout:
Do you consider that the 1st layout is better than the current layout? If other, please describe like I have so can visually see it. If the "Filter..." is not added to lessen the options, then "Recall..." would only properly work with "Word completion" and "Function and Word autocompletion" and then that could still lead to some confusion with the users. Recalling an unfiltered "Function autocompletion" would not achieve anything useful as the list would remain the same and as a negative cause extra processing for no gain and can lose the current word selection in the list. |
@mpheath thanks for the explanations. I think I see where we are misunderstanding each other. Even though the actual "filtering" and "recalling" operations are very different from a coding perspective, I was only asking about the checkboxes in the Preferences window; their labels and layout don't have a direct impact on the code. It's good to document connections to the code, but such information is better suited for the user manual. Labels certainly need to be informative, but they don't need to reflect the underlying code: they just need to describe the effects that the user will see. They also need to be concise, but not so brief that they suppress information. Here's an alternative setup to consider (note that, instead of "Filter", you can use something like "Reduce", "Update", etc.):
|
Description of the Issue
When you have the auto-complete number lowered to 1 or 2 (which is often useful), the list of options can get very long, so the current behaviour of jumping to different portions instead of refreshing/trimming the list can be cumbersome (especially since the list is grouped by category).
Steps to Reproduce the Issue
Current Behavior
The first 4 items remain, and the highlighted entry jumps to the 5th.
Requested Behavior
The first 4 items are cleared away.
Current Workaround
Delete the 'd' and retype.
Debug Information
The text was updated successfully, but these errors were encountered: