Sublime Forum

View.text_point negative row numbers

#1

First of all, let me know if you don’t yet want feedback on the API in Sublime Text 2—I don’t remember if you’ve mentioned either way.

If you pass a negative row number to View.text_point, the text point it returns is equal to View.size(). I’d much rather have it be 0 or raise an error—the current behavior is a little bit unexpected.
Also, if you pass a negative column number but a non-negative row number, then View.text_point can return negative values. While this is more desirable than returning large values, because things like View.show will still work in a seemingly correct way, it’s still a little bit counter-intuitive (raise an error here too?).

Thanks!

0 Likes

#2

Sounds good, will change

0 Likes

#3

Thanks!

0 Likes