Re: [textadept] Folding, lexer.lua

From: Tymur Gubayev <>
Date: Sun, 27 Nov 2011 17:28:04 +0100

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)

Received on Sun 27 Nov 2011 - 11:28:04 EST

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