Sublime Forum

Two possible autocomplete bugs

#1

I think I found two sort of odd things with autocomplete. Not sure if they’re ‘by design’ or bugs, but they didn’t work how I’d expect.

Issue 1: Scrolling past the end of the list of autocomplete items takes you to the next line in the editor.

  1. Create an HTML document with three or so lines in it.

  2. On line 2, type a < to start tag autocompletion.

  3. Use the arrow keys to scroll down to the last item in the autocomplete list.

  4. Once you hit the last item in the list, hit the down arrow one more time.

Expected: The selection would stay on the last item in the autocomplete list.

Actual: The autocomplete list disappears and the cursor moves down to line 3.

Since the “focus” is in the autocomplete list, it’s jarring to suddenly jump out. Also, if you’ve got a heavy finger on that down-arrow, you can pretty easily accidentally scroll past the end of the list and have to start all over.

Issue 2: Backspacing to the location before autocomplete started doesn’t end the autocomplete function.

  1. Create an HTML document with three or so lines in it.

  2. On line 2, indent a few times so there is whitespace at the start of the line, then type a < to start tag autocompletion.

  3. Backspace over the < character you had typed that started autocompletion. Keep backspacing until you hit the beginning of the line.

Expected: After backspacing over the character that started autocomplete, the autocomplete list would disappear because the context for autocomplete is no longer satisfied.

Actual: The autocomplete list remains visible until you hit escape to get out of it.

I almost think that any backspace or delete operation should cancel autocomplete immediately. The immediate text that has triggered autocomplete has changed, so it probably needs to be redetermined if autocomplete should still happen.

0 Likes