mirror of
https://github.com/ilyakooo0/helix.git
synced 2024-09-12 00:07:42 +03:00
Respect injections in :tree-sitter-highlight-name
This commit is contained in:
parent
5e0b3cc28b
commit
8b6565c839
@ -1546,10 +1546,7 @@ fn find_highlight_at_cursor(
|
||||
let text = doc.text().slice(..);
|
||||
let cursor = doc.selection(view.id).primary().cursor(text);
|
||||
let byte = text.char_to_byte(cursor);
|
||||
let node = syntax
|
||||
.tree()
|
||||
.root_node()
|
||||
.descendant_for_byte_range(byte, byte)?;
|
||||
let node = syntax.descendant_for_byte_range(byte, byte)?;
|
||||
// Query the same range as the one used in syntax highlighting.
|
||||
let range = {
|
||||
// Calculate viewport byte ranges:
|
||||
|
Loading…
Reference in New Issue
Block a user