mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-24 02:46:43 +00:00
Merge pull request #1911 from zed-industries/single-file-worktree-event-extension
Fix file extension retrieval for single-file worktrees
This commit is contained in:
parent
4f03031bba
commit
febbbb1f91
1 changed files with 8 additions and 9 deletions
|
@ -73,6 +73,7 @@ use std::{
|
||||||
mem,
|
mem,
|
||||||
num::NonZeroU32,
|
num::NonZeroU32,
|
||||||
ops::{Deref, DerefMut, Range, RangeInclusive},
|
ops::{Deref, DerefMut, Range, RangeInclusive},
|
||||||
|
path::Path,
|
||||||
sync::Arc,
|
sync::Arc,
|
||||||
time::{Duration, Instant},
|
time::{Duration, Instant},
|
||||||
};
|
};
|
||||||
|
@ -6536,15 +6537,13 @@ impl Editor {
|
||||||
.as_singleton()
|
.as_singleton()
|
||||||
.and_then(|b| b.read(cx).file()),
|
.and_then(|b| b.read(cx).file()),
|
||||||
) {
|
) {
|
||||||
project.read(cx).client().report_event(
|
let extension = Path::new(file.file_name(cx))
|
||||||
name,
|
.extension()
|
||||||
json!({
|
.and_then(|e| e.to_str());
|
||||||
"File Extension": file
|
project
|
||||||
.path()
|
.read(cx)
|
||||||
.extension()
|
.client()
|
||||||
.and_then(|e| e.to_str())
|
.report_event(name, json!({ "File Extension": extension }));
|
||||||
}),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue