Maintain selection on file/dir deletion in project panel (#20577)
Closes #20444 - Focus on next file/dir on deletion. - Focus on prev file/dir in case where it's last item in worktree. - Tested when multiple files/dirs are being deleted. Release Notes: - Maintain selection on file/dir deletion in project panel. --------- Co-authored-by: Kirill Bulatov <kirill@zed.dev>
This commit is contained in:
parent
933c11a9b2
commit
114c462143
3 changed files with 813 additions and 21 deletions
|
@ -48,7 +48,7 @@ use ui::{v_flex, ContextMenu};
|
|||
use util::{debug_panic, maybe, truncate_and_remove_front, ResultExt};
|
||||
|
||||
/// A selected entry in e.g. project panel.
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
pub struct SelectedEntry {
|
||||
pub worktree_id: WorktreeId,
|
||||
pub entry_id: ProjectEntryId,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue