Suggestions drop down not recognizing down press on join

meyerovbmeyerovb Posts: 21
edited January 16, 2013 1:51PM in SQL Prompt Previous Versions
"select * from thing1"[enter]
"join thing2 on "

As soon as I type space the suggestions box appears with the correct join, however if I press down immediately it doesn't recognize it. I need to wait a second before pressing it, or press it a second time, in order for it to select the first auto-suggest item.

This is getting annoying because I automatically press down+enter because this worked in the last version fine on my system, now it sends me to the next line and i have to go back and press space again to get the suggestions list back up.

Comments

  • Thanks for your post.

    By default, there is a 300 millisecond delay before the suggestion is triggered.

    Could you try decreasing this delay and see if that helps?

    You can set it through SQL Prompt 5 > Options > Behaviour > Triggering Behaviour
    Chris
  • Thanks for your post.

    By default, there is a 300 millisecond delay before the suggestion is triggered.

    Could you try decreasing this delay and see if that helps?

    You can set it through SQL Prompt 5 > Options > Behaviour > Triggering Behaviour

    The suggestion box appears just fine, clicking the down key immediately after it appears doesn't seem to function. But I'll try that anyways tomorrow to see if it helps.
  • I think I could sort of reproduce the problem you're having with a 300 ms delay, but with a 1 ms delay I couldn't type fast enough for the join selection to not be noticed.

    Try it out when you get the chance; it seemed to help for me.
    Chris
  • I am also very annoyed by this behavior even with a 1 ms delay set. I've found that it never happens when pressing ctrl + space, but it always happens after typing ON or AND and then pressing the down key. If I wait for a second it works just like meyerovb mentioned. I find that I hit down once hit enter and then have to press ctrl + space because it didn't select anything.

    This was not a problem in the previous version. Can you please add this to the list of things to fix?
  • wdhenrikwdhenrik Posts: 15 Bronze 1
    I completely agree that this bug needs to be fixed.

    I don't want to change the delay because there are many times I do not want it to popup immediately and 300ms delay is reasonable enough for that.

    This bug almost seems like SQLPrompt is rendering the suggestions list twice as I can occasionally highlight the top item in the list using the down arrow keys, but it will be de-selected a moment later and I'll have to press the down arrow again. Please fix.
  • To clarify, this issue can be readily demonstrated in SQL Prompt 5.3.6.28.

    Open Query window in SSMS 11.0.2100.60

    Type
    CREATE TABLE #Table1 (mykey INT, yourkey INT, thekey int)
    CREATE TABLE #table2 (mykey INT, yourkey INT, nokey int)

    Type
    SELECT *
    FROM #Table as T
    JOIN

    Now pretend you know these tables and you know how they appear in the list. As soon as you type JOIN and press the space bar, SQL Prompt will draw a selection box. As soon as you see it pop, you press the down arrow twice to select the second item from the list (#table2) and then tab to select it.

    You see the highlight first highlight the first row and you expect it to highlight the 2nd row so you press tab shortly after pressing the down arrow the second time. But what happens is that a tab is entered in the screen, and the SQL Prompt selection box re-draws itself to the right slightly and you can see the selection leave the 1st row, never making it to the 2nd row.

    Now if you plod along and go slow, this issue is not exposed. But if you go rapidly, it occurs.

    Note this is a behavior change from previous versions (don't know when it changed) as I know that for a long time I was having no issues, and then one day I started having issues. Most often it occurs on the join condition, since you get used to the join you want is always the second one it suggests. It's almost like it is not seeing the 2nd down arrow keypress before it gets the tab or it's missing the 1st down arrow keypress and only acting on the 2nd.
  • Also having this issue, and it's quite annoying. I often have to re-trigger the auto-suggest manually and pick, because it never works properly the first time when it's triggered automatically - it'll highlight the first suggestion for a fraction of a second, but then it removes it.
Sign In or Register to comment.