Re: Discovering TextAdept

From: mitchell <mforal.n....at.gmail.com>
Date: Tue, 23 Mar 2010 08:07:10 -0700 (PDT)

Robert,

> > > Thanks, I found where the underscored variables in sessions.lua came
> > > from (events.lua) - in the end understanding that was my problem. I
> > > tried including the x_offset position in sessions.lua, but for some
> > > reason without the side pane the scrolling does not happen. (Have you
> > > changed something else?) I compared with an older version, even with
> > > an hidden side pane the scrolling happens. Anyway, problem
> > > solved... :-)
>
> > What old version? Can you manually set x_offset via the Lua command
> > entry? It's possible the iface numbers do not match up when Scintilla
> > was upgraded in 2.1 if it works in 2.0 and not 2.1.
>
> Sorry - it seems I was mistaken. I was comparing version 2.1 with the
> latest version without Project Manager. The view still gets scrolled
> to the end of the line in the version without Project Manager, when I
> leave Textadept with the cursor at the end.
> However, it does not happen, when I have no Untitled buffer so
> Scintilla creates one. When I then switch to the last buffer I
> actually worked on, no scrolling happens. It seems to occur only for
> the last opened buffer.
> You can read and write buffer.x_offset. I tried in various places in
> sessions.lua and events.lua to include a "buffer.x_offset = 0" but I
> wasn't succesful...

I'm not sure if setting xoffset does the scrolling. I'm looking at the
Scintilla documentation (http://www.scintilla.org/
ScintillaDoc.html#SCI_SETXOFFSET). Maybe linescroll is what you are
looking for (http://www.scintilla.org/
ScintillaDoc.html#SCI_LINESCROLL). When a buffer is restored,
linescroll is called for putting the line into view, but not the
column position.

Mitchell

>
> - Robert
Received on Tue 23 Mar 2010 - 11:07:10 EDT

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