Tapatalk

Auto-completion dialog displayed even when whole suggested word typed (fixed)

Auto-completion dialog displayed even when whole suggested word typed (fixed)

27
Basic UserBasic User
27

    Jan 28, 2009#1

    Hello,
    since several versions of UE there is a bug (not a feature, or??).
    The AutoCompletion shows me the pulldown menu even when I have typed the whole word:

    screenshot_002_090128.png (4.74KiB)
    Example script


    In this case it is not possible to move the cursor by pressing the cursor down key e.g. to navigate to the next line. You have to press Enter first. But why??

    Carlos

    6,685587
    Grand MasterGrand Master
    6,685587

      Jan 28, 2009#2

      Well, I don't use auto-completion with Show auto-complete dialog automatically. I use Ctrl+Space to open the dialog when I want to auto-complete. I tested what you have described with various UltraEdit versions and it seems to be by design that the auto-completion dialog closes when either no string can be suggested (anymore) or a delimiter character is entered.

      I completely agree that it would make sense to close the auto-completion dialog when the entered string is already 100% identical (length and case of the characters) with a suggested string in the auto-completion dialog and there is no other string anymore in the auto-completion dialog.

      Please send an email to IDM support with that suggestion for a small but useful change in the auto-completion dialog handling. I support this small change too although I don't use auto-completion in the way you use.

      4
      NewbieNewbie
      4

        Jan 28, 2009#3

        Please note that there may be cases like:

        Code: Select all

        const
        const_iterator
        which would not allow the 'const_iterator' to match, as the 'const' would be matched earlier and the dialog box would close. Therefore Mofi's remark that there should not be any other string in the auto-completion dialog is crucial here.

        27
        Basic UserBasic User
        27

          Dec 07, 2009#4

          TLis wrote:Therefore Mofi's remark that there should not be any other string in the auto-completion dialog is crucial here.
          Yes, of course, the window should not appear if there is only one element and this word was already typed (*).
          I will ask the support if it is a bug or a feature ;)

          Thanks!
          Carlos

          (*) ... or: "had been already typed"??

            May 29, 2012#5

            Hi,

            I'm reactivating this topic. Since several versions of UE there is this bug (yeah, not a feature!):
            2012-05-29_shot_003.jpg (11.69KiB)
            auto completion

            After typing "quick" completely the auto completion box appears.

            But why? It's annoying (since several versions of UE)!

            Carlos

            115
            Power UserPower User
            115

              May 29, 2012#6

              I do not use auto-complete but wanted to see the behavior you mentioned so I turned it on with a new document window. I entered "The quick brown fox jumps over the lazy dog."

              I got auto-complete suggestions for each word after I entered the first three characters. Each time the auto-complete window would disappear as soon as I hit the space bar to go to the next word or when I typed the period at the end.

              I entered the line many more times with the same result. The only time the window stayed open was when I entered "dog" and then didn't press the period, just stopped typing. Of course this is proper behavior as the auto-complete does not know why I stopped typing at that point. To you it may seem wrong because you know that you are finished with the word. The computer only knows that you entered some characters without some sort of terminator to show that it is the end of a word.

              6,685587
              Grand MasterGrand Master
              6,685587

                May 29, 2012#7

                Well, the auto-complete window automatically disappears on typing next character or moving caret to another position. There are only 3 cases where it is really annoying when the auto-complete window remains open although it contains only 1 string and this string is in length and character by character 100% identical to already typed word:
                1. The user wants to see something which is below the now already not useful auto-complete list and therefore the users is forced to press ESC, TAB or RETURN to close the auto-complete window and see the needed information on one of the next lines.
                2. The user wants to insert next a horizontal tab character. But pressing TAB just results in finishing already completely typed string and closing the window. So the user must press key TAB a second time to get a horizontal tab inserted.
                3. The user wants to insert next a line break. But pressing RETURN just results in finishing already completely typed string and closing the window. So the user must press key RETURN a second time to get a line termination inserted.

                27
                Basic UserBasic User
                27

                  May 29, 2012#8

                  MickRC3 wrote:Of course this is proper behavior as the auto-complete does not know why I stopped typing at that point.
                  ... this make only sense when there is more than 1 word in the auto complete list. Example:
                  2012-05-29_shot_005.jpg (12.06KiB)


                  But why should appear the list in this example?
                  2012-05-29_shot_005.jpg (12.06KiB)

                  -> the only word UE knows is already typed!

                  And: in some cases (eg "easy typing" words ) I am faster than the auto complete feature. Result: the list appears only with this already typed singly word.

                  Therefore I need this feature only if there are at least 2 words in the list.

                  Thanks
                  2012-05-29_shot_006.jpg (11.16KiB)

                  2362
                  MasterMaster
                  2362

                    May 29, 2012#9

                    You're forgetting that for case-sensitive languages, auto-complete needs to keep the word there in case a correction needs to be made to the word in terms of case.

                    For example, typing Quick instead of quick may still show "quick" in the auto-complete, and will allow you to "change the case" in case you accidentally typed it in using the wrong case.

                    It would take extra time and slow UE down to remove "quick" from the list by having to compare it case insensitive AND case sensitive, which is what it would take to do so. I for one prefer the fast interface over one that can do 1,000,000 different things.

                    Sure, it won't slow things down on a small file, but on many large files in a large project, things are already getting tight, and every bit of processor usage starts to make a difference there.

                    It is not a bug. It IS a feature. One that I happen to like the way it is. However, if you, or others, would like to have the "option" of making a word disappear when the typing of that word is complete, then you should send that in as a feature request to IDM. These are user-to-user forums, and we can't do anything about it. Send an email requesting the feature to IDM.

                    27
                    Basic UserBasic User
                    27

                      May 29, 2012#10

                      If I do not write code I am writing in German (as you can maybe imagine ;)

                      ... so, last example:
                      2012-05-29_shot_014qoeaa[1].jpg (10.08KiB)

                      And now? Why does not appear "german"?

                      It still makes no sense for me... but okay, probably I am the only user who feels that this behavior is a bug and not a fe...

                      And yes, a few versions ago I contacted UE. But as you can read the problem is not solved.
                      Sorry, "my" problem.

                      And because I have no chance -- thank you again for your help and patience.

                      Viele Grüße aus dem case-sensitive good old Deutschland!

                      115
                      Power UserPower User
                      115

                        May 31, 2012#11

                        How can we explain the behavior of auto-complete using logic? In very broad terms it could look something like the simple flowchart below for a keystroke event. I assumed the default 3 character minimum for auto-completion, assumed auto-completion is selected, and assumed that a regular key is entered, not a hotkey. And of course the dialog box open, list populate, and dialog box close would be subprograms while the dialog box selection would be a new event with its own handler.

                        When we look at your question - why doesn't the dialog box close when there is only one choice and you don't select it - it makes sense why that doesn't happen. It is easy to code for something happening (an event). It is difficult or impossible to code for something not happening. Logic waits until a different event happens (which means you are really coding for the new event, not the non-event). It is easy to detect typing. It is impossible to detect not typing. At best you can detect not typing for a given period of time, but that doesn't 100% prove that typing has ended, only that time has expired. Maybe the user stopped to check a dictionary, to pick up the pen he/she dropped, or to go to the restroom. Maybe the user really is done, but logic cannot be written for maybe.

                        And in answer to your second question: "German" typed, why isn't "german" listed as a choice?

                        The table of choices auto-complete uses comes from four sources:
                        • the syntax-highlighting file linked to the active file or the default syntax file if the active file is new and not yet named
                        • the function list of the active file
                        • a user selected file of words specified by Advanced->Configuration->Editor->Word Wrap/Tab Settings-> Auto-complete file (default is no file)
                        • the previous 50K of the active file
                        So "german" has to be found in one of those locations in order to show up as a choice for auto-complete.

                        autosellogic.png (23.68KiB)

                        6,685587
                        Grand MasterGrand Master
                        6,685587

                          Jun 01, 2013#12

                          IDM introduced with UltraEdit v19.10 some new auto-complete configuration options:
                          • Sort matches by case
                            previously named Case-sensitive auto-complete dialog
                          • List only exact case matches
                          • List exact case matches first
                          Another enhancement is removing a word from the list if typed word already matches exactly (in length and case) with automatically closing the auto-complete list window if the list is empty after removing the exact word match.

                          So Carlos, your enhancement request is fulfilled in UE v19.10 (and later versions).


                          Just one more note:

                          I have sent following by email to IDM support after IDM released UE v19.10.0.1011.
                          Mofi wrote:The enhancement of not showing fully typed words anymore in auto-complete dialog is in general very good. But in one case it can very easily result in a wrong assumption about correct typing of a word as I found out in one of my *.c files by chance.

                          I have a smart template with name Filename which inserts the name of the active file.

                          FILE is the name of a predefined structure in programming language C defined in standard header file stdio.h which must be used when working with files in C.

                          And many programmers use often file as name of a variable which is a pointer to a FILE structure although that's definitely not a good name, especially when auto-correct feature is enabled, too.

                          So if now entering in a C file the word file and opening the auto-complete dialog with Ctrl+Space if not shown automatically, the dialog contains just

                          Filename
                          FILE

                          as file is already 100% matched, and the user might think that right spelling would be FILE although file is correct, too.

                          So if a typed word matches a word in the auto-complete list in length and case, it should be removed from the list, EXCEPT there is at least
                          one more word in the list with same length and same characters, but with one or more characters in other case. In this case it is better to still list also the 100% matching word in the auto-complete list.

                          For the example this means showing:

                          Filename
                          file
                          FILE
                          IDM support replied that it will be discussed with their developers what is the best way to handle this situation.