markdown-mode
markdown-mode copied to clipboard
Out-of-sync JIT-lock
When I stop typing, I often find that font lock changes faces incorrectly in text that follows the insertion point, as though it's reapplying the same styles at the old (pre-typing) character offsets.
Expected Behavior
If the syntactic role of following text is unchanged, JIT-font-lock should be idempotent, i.e. I should observe no change
Actual Behavior
Change is observed
Steps to Reproduce
With emacs -Q,
- open the attached file
- go to the end of line 439, and
- type quickly
- Then stop typing.
Software Versions
- Markdown Mode: 2.4-dev from 20180124.138 (melpa)
- Emacs: GNU Emacs 25.3.3 (x86_64-apple-darwin13.4.0, Carbon Version 157 AppKit 1265.21) of 2017-09-28
- OS: macOS High Sierra
Bump. This makes what used to be a wonderful experience, writing in markdown-mode, really miserable. I love your mode! Please make it work (again)
Thanks for reporting this and for the nice test case. I've identified and reverted the offending commit. Indeed, it was an attempt to improve performance by reusing cached text properties. I'll dig a little deeper to see what went wrong, but for now I've just reverted it.