discourse/discourse — pull request #235 by tms (2013-02-23 04:48:27+00:00)
Title: Tweak autocomplete/caret_position logic to not exclude the index 0 case

Fixes situation where autocomplete would bail if the cursor was at the beginning of the textarea, so usernames can be autocompleted as the first thing entered.