vicoapp / vico

Mac Programmers Text Editor
http://www.vicoapp.com/
658 stars 89 forks source link

Autocomplete doesn't correct camel casing mid-word. #68

Open farmdawgnation opened 11 years ago

farmdawgnation commented 11 years ago

There appears to be a bug in how auto complete handles mid word fill-ins, specifically that it doesn't seek back and correct case errors.

For example, assume I have defined a variable earlier named awesomeBaconSammich. Later in the file I start typing awesomeba and autocomplete correctly suggests awesomeBaconSammich. However, when I select that item from the autocomplete drop down the text awesomebaconSammich is what actually appears.

Shadowfiend commented 11 years ago

Likely reason here is that when we select a completion, rather than replacing the full range with the selected completion, we fill in the untyped part based on the selection. Can't say off the top of my head whether or not this'll be easy to fix with the modality of the completion left as it currently is, but it's likely the fix for this will live around ViCompletionController.m:405, in acceptByKey:.