A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://lists.gnu.org/archive/html/emacs-devel/2022-11/msg00157.html below:

Re: Initial fontification in sh-mode with tree-sittter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] From: Yuan Fu Subject: Re: Initial fontification in sh-mode with tree-sittter Date: Thu, 3 Nov 2022 00:16:11 -0700
> On Nov 2, 2022, at 11:36 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> 
>> From: Yuan Fu <casouri@gmail.com>
>> Date: Wed, 2 Nov 2022 18:25:13 -0700
>> Cc: João Paulo Labegalini de Carvalho <jaopaulolc@gmail.com>,
>> emacs-devel@gnu.org
>> 
>> What I ended up doing is to set jit-lock-context-unfontify-pos to the 
>> beginning of the string node (aka beginning of region A). Then in a timer 
>> jit-lock-context will refontify everything after that position. And I have 
>> some measure to break possible infinite recursion (fontify region -> set 
>> jit-lock-context-unfontify-pos -> cause refontification -> fontify region -> 
>> …).
> 
> OK, but beware of the case where region A is very large.  Could
> performance suffer in such cases?

That’s no problem, region A is still jit-locked, it’s only refortified when 
displayed.

Yuan


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4