zedapp / zed

Rethinking code editing.
http://zedapp.org
MIT License
2.22k stars 162 forks source link

Autocomplete with 1 Suggestion and the Tab Key #447

Closed allie-wake-up closed 10 years ago

allie-wake-up commented 10 years ago

When there is only 1 suggestion in autocomplete the tab button toggles selecting the lone option. This drives me crazy as sometimes I'll press tab simultaneously to it showing automatically, hit enter, and have a new line instead of a completed word. I think that tab should really just do nothing in this case.

zefhemel commented 10 years ago

So if I understand you correctly you'd like the lone suggestion to just show in the dropdown rather than it being picked immediately? Yeah, there's something to be said for that. I've had cases where immediate completion surprised me (or even was wrong).

allie-wake-up commented 10 years ago

Sorry I think I did a poor job of explaining what I meant. I don't mind when it just completes the word, though I agree that showing it in the dropdown instead could be better.

The issue I was referring to is when the dropdown is showing with just one suggestion. Normally with multiple suggestions the tab button will scroll through the list and it is impossible for none of the options to be highlighted. When there is only one suggestion it will toggle highlighting the lone suggestion. So no option is actually selected when I press enter.

Word selected in dropdown: screen shot 2014-09-10 at 1 24 05 pm

Word not selected after hitting tab: screen shot 2014-09-10 at 1 24 19 pm

zefhemel commented 10 years ago

Ah, that's odd. I'll look into that.