First pass on fixes
This commit is contained in:
parent
5826d89b97
commit
2f3be75fc7
269 changed files with 1593 additions and 2574 deletions
|
@ -194,12 +194,11 @@ impl EmbeddingIndex {
|
|||
project::PathChange::Added
|
||||
| project::PathChange::Updated
|
||||
| project::PathChange::AddedOrUpdated => {
|
||||
if let Some(entry) = worktree.entry_for_id(*entry_id) {
|
||||
if entry.is_file() {
|
||||
if let Some(entry) = worktree.entry_for_id(*entry_id)
|
||||
&& entry.is_file() {
|
||||
let handle = entries_being_indexed.insert(entry.id);
|
||||
updated_entries_tx.send((entry.clone(), handle)).await?;
|
||||
}
|
||||
}
|
||||
}
|
||||
project::PathChange::Removed => {
|
||||
let db_path = db_key_for_path(path);
|
||||
|
|
|
@ -384,11 +384,10 @@ impl ProjectIndex {
|
|||
cx: &App,
|
||||
) -> Option<Entity<WorktreeIndex>> {
|
||||
for index in self.worktree_indices.values() {
|
||||
if let WorktreeIndexHandle::Loaded { index, .. } = index {
|
||||
if index.read(cx).worktree().read(cx).id() == worktree_id {
|
||||
if let WorktreeIndexHandle::Loaded { index, .. } = index
|
||||
&& index.read(cx).worktree().read(cx).id() == worktree_id {
|
||||
return Some(index.clone());
|
||||
}
|
||||
}
|
||||
}
|
||||
None
|
||||
}
|
||||
|
|
|
@ -174,15 +174,13 @@ impl SemanticDb {
|
|||
file_content[start_line_byte_offset..end_line_byte_offset].to_string();
|
||||
LineEnding::normalize(&mut excerpt_content);
|
||||
|
||||
if let Some(prev_result) = loaded_results.last_mut() {
|
||||
if prev_result.full_path == full_path {
|
||||
if *prev_result.row_range.end() + 1 == start_row {
|
||||
if let Some(prev_result) = loaded_results.last_mut()
|
||||
&& prev_result.full_path == full_path
|
||||
&& *prev_result.row_range.end() + 1 == start_row {
|
||||
prev_result.row_range = *prev_result.row_range.start()..=end_row;
|
||||
prev_result.excerpt_content.push_str(&excerpt_content);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
loaded_results.push(LoadedSearchResult {
|
||||
path: result.path,
|
||||
|
|
|
@ -379,8 +379,8 @@ impl SummaryIndex {
|
|||
| project::PathChange::Added
|
||||
| project::PathChange::Updated
|
||||
| project::PathChange::AddedOrUpdated => {
|
||||
if let Some(entry) = worktree.entry_for_id(*entry_id) {
|
||||
if entry.is_file() {
|
||||
if let Some(entry) = worktree.entry_for_id(*entry_id)
|
||||
&& entry.is_file() {
|
||||
let needs_summary = Self::add_to_backlog(
|
||||
Arc::clone(&backlog),
|
||||
digest_db,
|
||||
|
@ -392,7 +392,6 @@ impl SummaryIndex {
|
|||
tx.send(needs_summary).await?;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
project::PathChange::Removed => {
|
||||
let _db_path = db_key_for_path(path);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue