snippets: Fix tabstop completion choices (#31955)
I'm not sure when snippet tabstop choices broke, I checked the parent of #31872 and they also don't work before that. Release Notes: - N/A
This commit is contained in:
parent
ccc173ebb1
commit
d15d85830a
2 changed files with 56 additions and 33 deletions
|
@ -4182,6 +4182,20 @@ impl MultiBufferSnapshot {
|
|||
(start..end, word_kind)
|
||||
}
|
||||
|
||||
pub fn char_kind_before<T: ToOffset>(
|
||||
&self,
|
||||
start: T,
|
||||
for_completion: bool,
|
||||
) -> Option<CharKind> {
|
||||
let start = start.to_offset(self);
|
||||
let classifier = self
|
||||
.char_classifier_at(start)
|
||||
.for_completion(for_completion);
|
||||
self.reversed_chars_at(start)
|
||||
.next()
|
||||
.map(|ch| classifier.kind(ch))
|
||||
}
|
||||
|
||||
pub fn is_singleton(&self) -> bool {
|
||||
self.singleton
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue