ichord/At.js — pull request #164 by beaulebens (2014-06-06 15:36:37+00:00)
Title: Don't re-open list after enter/tab insert.

If you're using the `space_after` option, then you might type '@jim' then have '@jimmy' be suggested. If you use Enter or Tab to insert that suggestion, then your caret would be left at @jimmy| (without a trailing space). At.js would then see that you're still "within" a string that needs suggestions, so it would open, and re-suggest @jimmy (and anything else matching, perhaps @jimmyjones). This change adds a temporary flag which suppresses that action whenever Enter/Tab are used to insert a suggestion. When the flag is seen, the list is suppressed, and then the flag is immediately removed (so that the next time the list is opened, it opens properly).

Open to other approaches on how to suppress the list after this sequence of actions, but re-opening immediately after inserting a suggestion is definitely undesirable behavior.

Thanks!