fix emu scope idx out of range
This commit is contained in:
parent
989b66b737
commit
05621800a4
@ -734,11 +734,16 @@ pub fn data_dec(
|
||||
var.symbol_kind = SymbolKind::VARIABLE;
|
||||
}
|
||||
for var in decs {
|
||||
let fix_end = if var.byte_idx > x.end {
|
||||
var.byte_idx + 1
|
||||
} else {
|
||||
x.end
|
||||
};
|
||||
data.push(Declaration::Scope(GenericScope {
|
||||
ident: var.ident,
|
||||
byte_idx: var.byte_idx,
|
||||
start: x.start,
|
||||
end: x.end,
|
||||
end: fix_end,
|
||||
url: url.clone(),
|
||||
type_str: var.type_str,
|
||||
completion_kind: x.completion_kind,
|
||||
|
Loading…
x
Reference in New Issue
Block a user