Start adding concept of Unclipped
text coordinates
Co-Authored-By: Max Brunsfeld <max@zed.dev>
This commit is contained in:
parent
436c89650a
commit
1c84e77c37
7 changed files with 139 additions and 124 deletions
|
@ -20,6 +20,7 @@ use gpui::{
|
|||
executor, AppContext, AsyncAppContext, Entity, ModelContext, ModelHandle, MutableAppContext,
|
||||
Task,
|
||||
};
|
||||
use language::Unclipped;
|
||||
use language::{
|
||||
proto::{deserialize_version, serialize_line_ending, serialize_version},
|
||||
Buffer, DiagnosticEntry, PointUtf16, Rope,
|
||||
|
@ -65,7 +66,7 @@ pub struct LocalWorktree {
|
|||
_background_scanner_task: Option<Task<()>>,
|
||||
poll_task: Option<Task<()>>,
|
||||
share: Option<ShareState>,
|
||||
diagnostics: HashMap<Arc<Path>, Vec<DiagnosticEntry<PointUtf16>>>,
|
||||
diagnostics: HashMap<Arc<Path>, Vec<DiagnosticEntry<Unclipped<PointUtf16>>>>,
|
||||
diagnostic_summaries: TreeMap<PathKey, DiagnosticSummary>,
|
||||
client: Arc<Client>,
|
||||
fs: Arc<dyn Fs>,
|
||||
|
@ -499,7 +500,7 @@ impl LocalWorktree {
|
|||
})
|
||||
}
|
||||
|
||||
pub fn diagnostics_for_path(&self, path: &Path) -> Option<Vec<DiagnosticEntry<PointUtf16>>> {
|
||||
pub fn diagnostics_for_path(&self, path: &Path) -> Option<Vec<DiagnosticEntry<Unclipped<PointUtf16>>>> {
|
||||
self.diagnostics.get(path).cloned()
|
||||
}
|
||||
|
||||
|
@ -507,7 +508,7 @@ impl LocalWorktree {
|
|||
&mut self,
|
||||
language_server_id: usize,
|
||||
worktree_path: Arc<Path>,
|
||||
diagnostics: Vec<DiagnosticEntry<PointUtf16>>,
|
||||
diagnostics: Vec<DiagnosticEntry<Unclipped<PointUtf16>>>,
|
||||
_: &mut ModelContext<Worktree>,
|
||||
) -> Result<bool> {
|
||||
self.diagnostics.remove(&worktree_path);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue