Re: Discovering TextAdept

From: Robert <ro....at.web.de>
Date: Sat, 20 Mar 2010 04:35:44 -0700 (PDT)

On Mar 14, 9:52 pm, mitchell <mforal.n....at.gmail.com> wrote:
[snip]
> I recall questions about window placement, not view scroll placement.
> I do not know how scroll position is calculated.

Ok, I checked on Windows and the Textadept window is actually partly
off screen. Weird.

> On Mar 15, 4:31 am, Samwyn <sam....at.s9.dion.ne.jp> wrote:
>
> > > Where is this scroll position calculated?
>
> > Calling buffer:set_sel at the 60th line in modules/textadept/
> > session.lua.
> > buffer:set_sel calls Scintillua's SCI_SETSEL directly, and the latter
> > does the autoscroll to the carret.
>
> Thanks! I found out, that buffer.x_offset can be used to set the
> position as well.
> Maybe buffer.x_offset could be saved in the session file and be reset
> when restoring the session.

I was trying to save the buffer.x_offset position in sessions.lua.
When trying (directly in Textadept)
for _, buffer in ipairs(textadept.buffers) do
textadept.print(buffer.x_offset) end
I get an error "the indexed Buffer is not the focused one". Is there
some workaround to get this value for all buffers?

Thanks,
Robert
Received on Sat 20 Mar 2010 - 07:35:44 EDT

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 11:40:11 EST