Re: [textadept] Folding, lexer.lua

From: mitchell <c....at.caladbolg.net>
Date: Sun, 27 Nov 2011 23:22:17 -0500 (EST)

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
Received on Sun 27 Nov 2011 - 23:22:17 EST

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