Re: [textadept] Re: Changing folding symbol to MARK_BOX* tree doesn't work

From: mitchell <>
Date: Sun, 15 May 2011 21:15:30 -0400 (EDT)

On Sun, 15 May 2011, Victor T. wrote:

> On May 15, 9:16�am, mitchell <> wrote:
>> I believe this is unique only to fold by indentation because the fold
>> levels do not usually increase or decrease by one, but instead by the
>> number of spaces involved in the change in indentation. The dmd folder
>> shows the correct markers because it changes the fold level by only one. I
>> wrote a lua folder as an experiment that changes levels by one and it
>> shows all markers too. So until folders have been implemented for the
>> lexers you use, not all markers will show up. Which ones do you use? If
>> it's possible, I will make those a priority.
> I usually work with cpp but it seems like this problem applies to many
> other lexers as well. For example, as a test I renamed the extension
> to .cs and the C# lexer are the same issue since it has no _fold.
> Surprisingly lua has this issue as well.

Yeah, all lexers except dmd use

> This makes me wonder whether the default way of folding based on
> indentation is appropriate.

It's not, but I didn't have time to write folders for all languages. is an easy way to support basic folding for all code.

> I don't understand why the fold level
> would ever change more than one based on the indent. uses indent size as the fold level. If there are 2
spaces on the next line, the fold level goes up by 2 instead of one.
(There is no easy way of measuring changes in indent size since that
information is not available to the lexer.)

> Also, doesn't the
> scintilla edit control already have folds implemented properly for its
> language lexers that textadept can take advantage of? Many of the
> other scintilla based editors doesn't seem to have this problem.

Those lexers are not the Lua lexers that textadept uses.

Received on Sun 15 May 2011 - 21:15:30 EDT

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