Finish generalizing ToggleComments to support block comments
This commit is contained in:
parent
d9fb8c90d8
commit
aa86806408
3 changed files with 126 additions and 24 deletions
|
@ -1840,6 +1840,7 @@ impl BufferSnapshot {
|
|||
let offset = position.to_offset(self);
|
||||
self.syntax
|
||||
.layers_for_range(offset..offset, &self.text)
|
||||
.filter(|l| l.node.end_byte() > offset)
|
||||
.last()
|
||||
.map(|info| info.language)
|
||||
.or(self.language.as_ref())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue