From 6da7d6b2be315b6386b9b7d2c2e92146753c4060 Mon Sep 17 00:00:00 2001 From: Matthew Tucciarone Date: Wed, 1 Apr 2026 18:53:44 +0700 Subject: [PATCH 1/2] fix: after hitting enter when creating an object, select it in the viewer --- README.md | 2 -- src/gui/windows/containers/itemviewer.rs | 9 ++++++++- src/gui/windows/mainwindow_imp.rs | 3 +++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5286e84..c306fc2 100644 --- a/README.md +++ b/README.md @@ -294,10 +294,8 @@ - [ ] Support network devices ## 🐛 Known Bugs -- After hitting "Enter" when renaming a new file/folder, it should automatically select that item in the itemviewer - Dragging and dropping files into empty folders/directories doesn't do anything - Hitting "Shift" after already shift-selecting files drops the entire file selection -- Entering "%appdata%" in the breadcrumbs/path throws an invalid path errors ## Star History diff --git a/src/gui/windows/containers/itemviewer.rs b/src/gui/windows/containers/itemviewer.rs index 8454f0b..7e057a2 100644 --- a/src/gui/windows/containers/itemviewer.rs +++ b/src/gui/windows/containers/itemviewer.rs @@ -147,7 +147,7 @@ pub fn draw_item_viewer( .resizable(true) .id_salt("item_viewer_table"); - // If we have a newly created row, scroll to it + // If we have a newly created row, scroll to it and select it if let Some(new_path) = &explorer_state.newly_created_path { if let Some(idx) = filter_state .cached_indices @@ -155,6 +155,13 @@ pub fn draw_item_viewer( .position(|&i| files[i].path == *new_path) { table = table.scroll_to_row(idx, Some(egui::Align::Center)); + + // Auto-select the newly created/renamed item + explorer_state.selected_paths.clear(); + explorer_state.selected_paths.insert(new_path.clone()); + explorer_state.selection_anchor = Some(idx); + explorer_state.selection_focus = Some(idx); + explorer_state.newly_created_path = None; } } diff --git a/src/gui/windows/mainwindow_imp.rs b/src/gui/windows/mainwindow_imp.rs index c319f8e..ecdcf19 100644 --- a/src/gui/windows/mainwindow_imp.rs +++ b/src/gui/windows/mainwindow_imp.rs @@ -347,6 +347,9 @@ impl MainWindow { file_op.PerformOperations().ok(); } + + // Set the renamed file path for auto-selection and scrolling + self.explorer_state.newly_created_path = Some(target); } } From 095b2b11cd29a08849d1a0c7c180258d242a859d Mon Sep 17 00:00:00 2001 From: Matthew Tucciarone Date: Wed, 1 Apr 2026 19:01:11 +0700 Subject: [PATCH 2/2] fix: drag and drop from windows into empty folder --- README.md | 2 +- src/gui/windows/containers/itemviewer.rs | 19 +++++++++++++++++-- src/gui/windows/mainwindow_imp.rs | 2 +- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c306fc2..f7e53e0 100644 --- a/README.md +++ b/README.md @@ -292,9 +292,9 @@ - Best for "popup over app" with no lag - [ ] Drag and drop files into breadcrumb folders - [ ] Support network devices +- [ ] Drag and drop files from EdenExplorer into Windows objects (Desktop, File Explorer, applications, etc.) ## 🐛 Known Bugs -- Dragging and dropping files into empty folders/directories doesn't do anything - Hitting "Shift" after already shift-selecting files drops the entire file selection ## Star History diff --git a/src/gui/windows/containers/itemviewer.rs b/src/gui/windows/containers/itemviewer.rs index 7e057a2..fb9eaa4 100644 --- a/src/gui/windows/containers/itemviewer.rs +++ b/src/gui/windows/containers/itemviewer.rs @@ -53,6 +53,21 @@ pub fn draw_item_viewer( let mut any_row_hovered = false; if files.is_empty() { + // Handle drag and drop for empty folders + if ui.ctx().input(|i| !i.raw.dropped_files.is_empty()) { + let dropped_paths: Vec = ui.ctx().input(|i| { + i.raw + .dropped_files + .iter() + .filter_map(|f| f.path.clone()) + .collect() + }); + + if !dropped_paths.is_empty() { + action = Some(ItemViewerAction::FilesDropped(dropped_paths)); + } + } + ui.centered_and_justified(|ui| { if is_loading { ui.add(egui::Spinner::new().size(28.0)); @@ -155,13 +170,13 @@ pub fn draw_item_viewer( .position(|&i| files[i].path == *new_path) { table = table.scroll_to_row(idx, Some(egui::Align::Center)); - + // Auto-select the newly created/renamed item explorer_state.selected_paths.clear(); explorer_state.selected_paths.insert(new_path.clone()); explorer_state.selection_anchor = Some(idx); explorer_state.selection_focus = Some(idx); - + explorer_state.newly_created_path = None; } } diff --git a/src/gui/windows/mainwindow_imp.rs b/src/gui/windows/mainwindow_imp.rs index ecdcf19..e9a50fc 100644 --- a/src/gui/windows/mainwindow_imp.rs +++ b/src/gui/windows/mainwindow_imp.rs @@ -347,7 +347,7 @@ impl MainWindow { file_op.PerformOperations().ok(); } - + // Set the renamed file path for auto-selection and scrolling self.explorer_state.newly_created_path = Some(target); }