Skip to content

Commit

Permalink
use remove-text-properties
Browse files Browse the repository at this point in the history
This seems to be the proper way to do this.
  • Loading branch information
th0rex committed Jan 2, 2020
1 parent 00d558f commit 00bf4e9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tree-sitter-highlight.el
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,9 @@ to faces. Each function takes no arguments."
tree-sitter-highlight--injections-query
#'ts-node-text
(lambda (start end)
(put-text-property (ts-byte-to-position start)
(ts-byte-to-position end)
'face
nil))
(remove-text-properties (ts-byte-to-position start)
(ts-byte-to-position end)
'(face nil)))
(lambda (language)
(car (tree-sitter-highlight--get-injection (intern language))))
(lambda (language)
Expand Down

0 comments on commit 00bf4e9

Please sign in to comment.