From: Gerry Snyder on
Arjen Markus wrote:
> On 7 jan, 18:43, "Miko" <michel.salvagn...(a)free.fr> wrote:
>> Hi
>> look at Ctext....
>>
>>
> Yes, ctext in the Tklib library is the easiest way to accomplish this.

Hmmmm, the last time I looked at ctext there was a problem in 8.5 with
the line numbers not matching the smooth scrolling of the text, making
them somewhere in the confusing/misleading/unusable range.

Guess it's time to try again. Thanks!


Gerry
From: Arjen Markus on
On 8 jan, 14:42, Gerry Snyder <mesmerizer...(a)gmail.com> wrote:
> Arjen Markus wrote:
> > On 7 jan, 18:43, "Miko" <michel.salvagn...(a)free.fr> wrote:
> >> Hi
> >> look at Ctext....
>
> > Yes, ctext in the Tklib library is the easiest way to accomplish this.
>
> Hmmmm, the last time I looked at ctext there was a problem in 8.5 with
> the line numbers not matching the smooth scrolling of the text, making
> them somewhere in the confusing/misleading/unusable range.
>
> Guess it's time to try again.  Thanks!
>
> Gerry

Hm, that is still there - version 3.2. Has this been reported?
As a drastic workaround, you can always turn off the numbers ;).

Regards,

Arjen
From: MSEdit on
On Jan 8, 3:58 pm, Arjen Markus <arjen.markus...(a)gmail.com> wrote:
> On 8 jan, 14:42, Gerry Snyder <mesmerizer...(a)gmail.com> wrote:
>
> > Arjen Markus wrote:
> > > On 7 jan, 18:43, "Miko" <michel.salvagn...(a)free.fr> wrote:
> > >> Hi
> > >> look at Ctext....
>
> > > Yes, ctext in the Tklib library is the easiest way to accomplish this..
>
> > Hmmmm, the last time I looked at ctext there was a problem in 8.5 with
> > the line numbers not matching the smooth scrolling of the text, making
> > them somewhere in the confusing/misleading/unusable range.
>
> > Guess it's time to try again.  Thanks!
>
> > Gerry
>
> Hm, that is still there - version 3.2. Has this been reported?
> As a drastic workaround, you can always turn off the numbers ;).
>
> Regards,
>
> Arjen

Hi,

I simply added the following 4 line of code to the end of the
'ctext::linemapUpdate' procedure
# Calculate the pixel offset of the first line of text
set off [lindex [$win._t dlineinfo @0,0] 1]
# Adjust the offset
set off [expr {abs($off-3)}]
# Yscroll the two text widgets by the number of pixels calculated
# $win.b yview scroll $off pixels
$win.l yview scroll $off pixels

This seems to work well, but i have major performance problems with
8.5.7 so have not extensivly tested this (I am still at 8.4.19 for
now)

OOPS the $win.b line is to display my bookmarks so leave it as a
comment or simply delete it
Martyn