Re: [code] [textadept] highlighting dates and hours

From: Mitchell <m.att.foicica.com>
Date: Fri, 7 Apr 2017 18:05:44 -0400 (EDT)

Hi,

On Fri, 7 Apr 2017, Pascal wrote:

> the init.lua file sent yesterday contained a small error that totally
> blocks TA :
>
> --.att.line120
> if buffer:search_in_target('google||yahoo|facebook|twitter') == -1 then
> break end
>
> so, with this corrected one saved in /tmp/, if I run TA like this :
>
> $ textadept -v
> Textadept 9.3
> Copyright © 2007-2017 Mitchell. See LICENSE.
> http://foicica.com/textadept
>
> $ textadept -n -u /tmp/ /tmp/test.ko.xml /tmp/test.ok.xml

Thank you very much for the instructions and files. I was easily able to
see what you are describing. Since you're calling `recursive_folding()` on
the buffer immediately after opening it, Textadept has not had enough time
to perform syntax highlighting (which is connected to folding). Therefore
there are no "fold points" to fold on. Placing the following at the top of
your `recursive_folding()` function solves the problem:

   buffer:colourise(0, -1)

This forces Textadept to syntax highlight the entire document immediately
before continuing with your fold process. Note: this will cause slower
startup times for large files, but that's the price you pay if you want to
fold the entire buffer accurately.

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 Fri 07 Apr 2017 - 18:05:44 EDT

This archive was generated by hypermail 2.2.0 : Sat 08 Apr 2017 - 06:50:02 EDT