Re: [textadept] Folding, lexer.lua

From: Tymur Gubayev <tymur.guba....at.gmail.com>
Date: Mon, 28 Nov 2011 09:56:23 +0100

Hi Mitchell,

no, i'm using 4.2, and the bug is still there.
I made 2 screenshots to illustrate it, compare lines 3 and 8. There is
also another bug visible, not yet fixed, at line 21 - there is no
decrease in fold level, thus foldblock of the function at line 19 is
too large.
Test file also attached.

Tymur

On 28 November 2011 05:22, mitchell <c....at.caladbolg.net> wrote:
> Hi Tymur,
>
> On Sun, 27 Nov 2011, Tymur Gubayev wrote:
>
>> After long break I got my hands on textadept again... After I did find
>> the functions `buffer:marker_enable_highlight` and
>> `buffer:marker_set_back_selected` there was no need to reimplement the
>> wheel (highlight.indentation.guides), so I decided to move on to fix a
>> bug in folding comments, that annoyed my all the time.
>>
>> The bug:
>> In lua code like this:
>>
>> ----
>> -- 2nd line of the comment, so we will get a fold here
>>
>> fold level will increased twice but decreased only once; same is with
>> long comments.
>>
>> The easy and dirty solution I used is to check the style of symbol
>> just before the start comment sequence: if it's `comment` quit, else
>> process as usual.
>>
>> Since long comments are handled in lua.lua, i need to make that
>> style-checking function global.
>>
>> See attachement (result of `hg diff lexers/lexer.lua lexers/lua.lua >
>> fold.patch` from scintillua folder)
>
> Thanks for the patch, but I am not able to reproduce the bug using the
> latest 4.2. From your comments in the bug tracker, I presume you are still
> using 3.x? It's possible this bug was already fixed last August[1]. Please
> let me know if this is not the case.
>
> mitchell
>
> [1]:
> http://code.google.com/p/scintillua/source/detail?r=9b82563097128e559d9168f49d5e84e4825728ec
>
> --
> You received this message because you are subscribed to the Google Groups
> "textadept" group.
> To post to this group, send email to textadept.at.googlegroups.com.
> To unsubscribe from this group, send email to
> textadept+unsubscribe.at.googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/textadept?hl=en.
>
>

scr1.jpg scr1.jpg
Received on Mon 28 Nov 2011 - 03:56:23 EST

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 12:20:12 EST