Sublime Forum

A method like Selection.begin() that counts all characters

#1

It would be good to have a method like Selection.begin() that counts unprintable characters.

For example, the current implementation counts \r\n as a single character.

0 Likes

#2

ST doesn’t treat \r\n as two characters at all internally, or rather with what gets exposed to the Python interface. Python normally treats those as \n as well, by the way.

The “proper” line endings are only written on save.

0 Likes