insanehunter / XCode4_beginning_of_line

Xcode plugin to make HOME key jump to the first non-whitespace line of code
168 stars 21 forks source link

Fix delete-to-beginning issue. #29

Closed tyeen closed 9 years ago

tyeen commented 9 years ago

When the cursor is ahead of the first character of the current line, and hit command+delete, Xcode crashes.

The reason is that the "caretLocation" is smaller than the "codeStartRange.location", and the calculated "deleteRange"'s length is minus.

insanehunter commented 9 years ago

Great job! Thank you for this fix.