R6.3 round 2 fix: an explicit open of a shown file joins the list
Opening a file a tab already shows only focuses it; the recent list now learns it too. The restart regression reopens the restored file. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
1abaa5dc83
commit
030ecfcff6
3 files changed
+24
-6
No files matched your search
@@ -13,9 +13,14 @@ use crate::folder::{Folder, markdown_under};
|
||||
impl Desk {
|
||||
/// A folder lists beside; a file opens in a tab.
|
||||
pub fn open_path(&mut self, path: PathBuf, cx: &mut Context<Self>) {
|
||||
match path.is_dir() {
|
||||
true => self.open_folder(path, cx),
|
||||
false => self.open_file(path, cx),
|
||||
if path.is_dir() {
|
||||
return self.open_folder(path, cx);
|
||||
}
|
||||
// A shown file only takes focus; the list still learns.
|
||||
let shown = self.tab_of(&path).is_some();
|
||||
self.open_file(path.clone(), cx);
|
||||
if shown {
|
||||
self.remember(&path, cx);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user