Home Download Buy Blog Forum Support

View.text_point negative row numbers

View.text_point negative row numbers

Postby adzenith on Sat Jan 29, 2011 6:48 pm

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!
adzenith
 
Posts: 1213
Joined: Mon Oct 19, 2009 9:12 pm

Re: View.text_point negative row numbers

Postby jps on Sat Jan 29, 2011 8:46 pm

Sounds good, will change
jps
Site Admin
 
Posts: 3062
Joined: Wed Mar 19, 2008 12:33 pm

Re: View.text_point negative row numbers

Postby adzenith on Sat Jan 29, 2011 8:58 pm

Thanks!
adzenith
 
Posts: 1213
Joined: Mon Oct 19, 2009 9:12 pm


Return to Plugin Development

Who is online

Users browsing this forum: Yahoo [Bot] and 4 guests