From: Yuan Fu Date: Fri, 4 Nov 2022 02:37:55 +0000 (-0700) Subject: ; Tree-sitter: Don't refontify if entity contained in the region X-Git-Tag: emacs-29.0.90~1723 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b028d4f7dfbd72790679423a8dcce9994b07834d;p=emacs.git ; Tree-sitter: Don't refontify if entity contained in the region * lisp/treesit.el (treesit-font-lock-contextual-post-process): Only refontify when NODE-START < region START. --- diff --git a/lisp/treesit.el b/lisp/treesit.el index d6058cdc43f..7d961476cd7 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el @@ -696,7 +696,7 @@ If VERBOSE is non-nil, print debugging information." (when verbose (message "Contextual: region: %s-%s, node: %s-%s" start end node-start node-end)) - (when (<= node-end end) + (when (and (< node-start start) (<= node-end end)) (if (get-text-property node-end-1 prop-sym) ;; We are called from a refontification by jit-lock-context, ;; caused by a previous call to this function.