enjoy

David Kleingeld and Jakub Konka created

Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>

Change summary

Cargo.toml                                  | 2 +-
crates/git_ui/src/project_diff.rs           | 6 +++++-
crates/language/src/buffer.rs               | 1 +
crates/project/src/git_store/branch_diff.rs | 2 ++
4 files changed, 9 insertions(+), 2 deletions(-)

Detailed changes

Cargo.toml 🔗

@@ -839,7 +839,7 @@ ui_input = { codegen-units = 1 }
 zed_actions = { codegen-units = 1 }
 
 [profile.release]
-debug = "limited"
+debug = "full"
 lto = "thin"
 codegen-units = 1
 

crates/git_ui/src/project_diff.rs 🔗

@@ -32,7 +32,7 @@ use project::{
     },
 };
 use settings::{Settings, SettingsStore};
-use std::any::{Any, TypeId};
+use std::{any::{Any, TypeId}, time::Duration};
 use std::ops::Range;
 use std::sync::Arc;
 use theme::ActiveTheme;
@@ -590,6 +590,10 @@ impl ProjectDiff {
                     .ok();
                 })?;
             }
+            cx.background_executor().timer(Duration::from_millis(5)).await;
+            this.update(cx, |_, cx| {
+                cx.notify();
+            })?;
         }
         this.update(cx, |this, cx| {
             this.pending_scroll.take();

crates/language/src/buffer.rs 🔗

@@ -969,6 +969,7 @@ impl Buffer {
 
     /// Builds a [`Buffer`] with the given underlying [`TextBuffer`], diff base, [`File`] and [`Capability`].
     pub fn build(buffer: TextBuffer, file: Option<Arc<dyn File>>, capability: Capability) -> Self {
+        log::info!("file: {:?}", file.as_ref().map(|f| f.path()));
         let saved_mtime = file.as_ref().and_then(|file| file.disk_state().mtime());
         let snapshot = buffer.snapshot();
         let syntax_map = Mutex::new(SyntaxMap::new(&snapshot));

crates/project/src/git_store/branch_diff.rs 🔗

@@ -319,6 +319,8 @@ impl BranchDiff {
                 });
             }
         });
+        // let names: Vec<_> = output.iter().map(|o| o.repo_path.as_unix_str()).collect();
+        // eprintln!("OUTPUT IS *********************************: {names:?}");
         output
     }