I found a small bug which crashes Sublime Text.
To replicate it:
- create a new document
ctrl+n
- set tabs size (or spaces) to 4 in the lower right of the screen
- make 4 spaces and one character, your document looks now like this:
⋅⋅⋅⋅s
- place your cursor between the third and fourth space
⋅⋅⋅|⋅s
- hit
ctrl+p
and choose ‘Indentation: convert to tabs’ - Sublime Text crashes
This happens because as the four spaces are converted to a single tab (one character). As your cursor can not be at the position it was previously (inside the indentation), sublime text tries to move the cursor away. This fails, because Sublime Text tries to move the cursor 2 chars behind the indentation, but the document ends (EOF) after 1 char. So the cursor is moved out of the document and Sublime Text crashes.
*le me feeling like a crazy h4x0r*