Re: [code] [textadept] Block comments

From: Mitchell <m.att.foicica.com>
Date: Mon, 20 May 2013 08:55:35 -0400 (EDT)

Richard,

On Sun, 19 May 2013, Richard Philips wrote:

> Hi,
>
> I think I found a small (but annoying) error in block_comment
> (textadept/modules/textadept/editing.lua)
>
> After executing a block comment, the caret is on the wrong place.
>
> I think the reason for that is that the variable 'pos' is local to the
> for-loop used in the code.
>
> In a similar situation I worked with a variable 'origin', defined as
>
> local origin = buffer.length - pos
>
> (before executing the loop).
>
> After the loop:
>
> pos = buffer.length - origin
>
> brought the caret in the right position.

Thanks for the report and solution. However, toggling block comment for
multiple lines does not update the anchor position (beginning of the
selection) appropriately. Do you have any ideas there?

Cheers,
Mitchell

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Mon 20 May 2013 - 08:55:35 EDT

This archive was generated by hypermail 2.2.0 : Tue 21 May 2013 - 06:42:30 EDT