migrator: In-memory migration and improved UX (#24621)
This PR adds: - Support for deprecated keymap and settings (In-memory migration) - Migration prompt only shown in `settings.json` / `keymap.json`. Release Notes: - The migration banner will only appear in `settings.json` and `keymap.json` if you have deprecated settings or keybindings, allowing you to migrate them to work with the new version on Zed.
This commit is contained in:
parent
498bb518ff
commit
65934ae181
6 changed files with 375 additions and 196 deletions
|
@ -12827,11 +12827,17 @@ impl Editor {
|
|||
.and_then(|f| f.as_local())
|
||||
}
|
||||
|
||||
fn target_file_abs_path(&self, cx: &mut Context<Self>) -> Option<PathBuf> {
|
||||
pub fn target_file_abs_path(&self, cx: &mut Context<Self>) -> Option<PathBuf> {
|
||||
self.active_excerpt(cx).and_then(|(_, buffer, _)| {
|
||||
let project_path = buffer.read(cx).project_path(cx)?;
|
||||
let project = self.project.as_ref()?.read(cx);
|
||||
project.absolute_path(&project_path, cx)
|
||||
let buffer = buffer.read(cx);
|
||||
if let Some(project_path) = buffer.project_path(cx) {
|
||||
let project = self.project.as_ref()?.read(cx);
|
||||
project.absolute_path(&project_path, cx)
|
||||
} else {
|
||||
buffer
|
||||
.file()
|
||||
.and_then(|file| file.as_local().map(|file| file.abs_path(cx)))
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue