[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#66732: tree-sitter fontification doesn't update multi-line syntax re
From: |
Stefan Monnier |
Subject: |
bug#66732: tree-sitter fontification doesn't update multi-line syntax reliably |
Date: |
Mon, 11 Dec 2023 09:35:17 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
>> [1] The chain of events if roughly: user types the last "/" -> redisplay
>> -> fontify that character -> access parser -> parser reparses -> calls
>> notifier.
>
> The way to mark region of text as not fontified is to set its
> 'fontified' property nil.
Indeed, but if you do it from within jit-lock it will not work as
expected because jit-lock will mark the chunk just processed with
`fontified` == t.
> Instead of a timer, did you try to use pre-redisplay-function?
Anything that runs "later" (i.e. after we exit `jit-lock-fontify-now`)
will work, but `pre-redisplay-function` means the display will only be
updated at the next redisplay, whereas with a timer we also force
a redisplay, thus shortening the time during which we display an
incompletely fontified chunk.
Jit-lock itself uses a similar timer for similar purposes.
We could make it slightly cheaper by exporting the `pending_funcalls` to
ELisp and then using it instead of a 0s timer.
Stefan
- bug#66732: tree-sitter fontification doesn't update multi-line syntax reliably, Yuan Fu, 2023/12/10
- bug#66732: tree-sitter fontification doesn't update multi-line syntax reliably, Eli Zaretskii, 2023/12/11
- bug#66732: tree-sitter fontification doesn't update multi-line syntax reliably,
Stefan Monnier <=
- bug#66732: tree-sitter fontification doesn't update multi-line syntax reliably, Dmitry Gutov, 2023/12/11
- bug#66732: tree-sitter fontification doesn't update multi-line syntax reliably, Yuan Fu, 2023/12/12
- bug#66732: tree-sitter fontification doesn't update multi-line syntax reliably, Dmitry Gutov, 2023/12/12
- bug#66732: tree-sitter fontification doesn't update multi-line syntax reliably, Yuan Fu, 2023/12/12
- bug#66732: tree-sitter fontification doesn't update multi-line syntax reliably, Stefan Monnier, 2023/12/12
- bug#66732: tree-sitter fontification doesn't update multi-line syntax reliably, Yuan Fu, 2023/12/13
- bug#66732: tree-sitter fontification doesn't update multi-line syntax reliably, Stefan Monnier, 2023/12/13
- bug#66732: tree-sitter fontification doesn't update multi-line syntax reliably, Dmitry Gutov, 2023/12/13
- bug#66732: tree-sitter fontification doesn't update multi-line syntax reliably, Yuan Fu, 2023/12/14
- bug#66732: tree-sitter fontification doesn't update multi-line syntax reliably, Dmitry Gutov, 2023/12/14