Sanitize ranges in code labels coming from extensions (#10307)
Without any sanitization, extensions would be able to crash zed, because the editor code assumes these ranges are valid. Release Notes: - N/A
This commit is contained in:
parent
a4566c36a3
commit
cc367d43d6
2 changed files with 91 additions and 39 deletions
|
@ -1,22 +1,20 @@
|
|||
mod since_v0_0_1;
|
||||
mod since_v0_0_4;
|
||||
mod since_v0_0_6;
|
||||
use since_v0_0_6 as latest;
|
||||
|
||||
use std::ops::RangeInclusive;
|
||||
use std::sync::Arc;
|
||||
|
||||
use super::{wasm_engine, WasmState};
|
||||
use anyhow::{Context, Result};
|
||||
use language::{LanguageServerName, LspAdapterDelegate};
|
||||
use semantic_version::SemanticVersion;
|
||||
use std::{ops::RangeInclusive, sync::Arc};
|
||||
use wasmtime::{
|
||||
component::{Component, Instance, Linker, Resource},
|
||||
Store,
|
||||
};
|
||||
|
||||
use super::{wasm_engine, WasmState};
|
||||
|
||||
use since_v0_0_6 as latest;
|
||||
|
||||
#[cfg(test)]
|
||||
pub use latest::CodeLabelSpanLiteral;
|
||||
pub use latest::{
|
||||
zed::extension::lsp::{Completion, CompletionKind, InsertTextFormat, Symbol, SymbolKind},
|
||||
CodeLabel, CodeLabelSpan, Command, Range,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue