Tweak auto-completion

Allow new lines to be entered before a line that auto-completes by requiring the cursor be at the end of the line first.
Merge pull request #40 from nevercast/patch-1

Tweak auto-completion