Home Download Buy Blog Forum Support

Dimensions of View

Dimensions of View

Postby adzenith on Wed Feb 09, 2011 10:27 pm

I can figure out the height of a view by using View.rowcol on the begin and end of View.visible_region, but this only works if the buffer is longer than the view and the view isn't scrolled past the end of the buffer. Additionally, it's very hard to figure out how wide the view is. Could there be a function that returns the width and height of the view? Even better, if it could also return the row-offset and column-offset, that'd be ideal. The row-offset is easy to figure out, but the column-offset is hard to figure out in the same way that the width of the view is.
Thanks!
adzenith
 
Posts: 1217
Joined: Mon Oct 19, 2009 9:12 pm

Re: Dimensions of View

Postby adzenith on Wed Feb 09, 2011 10:30 pm

It would also be awesome if I could pass a column-offset into View.show. This would allow me to do things like scroll the buffer a little bit further right past the end of a short line as long as there are longer lines in the file—right now it's difficult to use View.show to scroll the view to places that it's easy to get to by using the scrollbars.
adzenith
 
Posts: 1217
Joined: Mon Oct 19, 2009 9:12 pm


Return to Ideas and Feature Requests

Who is online

Users browsing this forum: steolo and 9 guests