Apply external command formatting if buffer has changed while computing it

This commit is contained in:
Max Brunsfeld 2023-03-01 10:17:04 -08:00
parent 368d2a73ea
commit 70cb2fa8d7
3 changed files with 18 additions and 32 deletions

View file

@ -254,7 +254,7 @@ async fn test_normalize_whitespace(cx: &mut gpui::TestAppContext) {
let format_diff = format.await;
buffer.update(cx, |buffer, cx| {
let version_before_format = format_diff.base_version.clone();
buffer.apply_non_conflicting_portion_of_diff(format_diff, cx);
buffer.apply_diff(format_diff, cx);
// The outcome depends on the order of concurrent taks.
//