Unify file-tree selection across mouse and keyboard #44
No reviewers
Labels
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
northgale/ckeditor!44
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/044-unify-file-tree-selection-across-mouse-and-key"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Unify file-tree selection across mouse and keyboard
Touches 4 files:
ck-ui/src/components/tree.rs,ckeditor/src/app_layout/focus.rs,ckeditor/src/app_layout/panel_content.rs,ckeditor/src/panels/file_tree.rs.Happy with this. I ran the suite against the branch and it is green,
ck-ui/src/components/tree.rsincluded.@ -101,6 +108,11 @@ impl<'a> TreeItem<'a> {self}pub fn scroll_into_view(mut self, scroll: bool) -> Self {scroll_into_viewis public. Does anything outside the crate call it, or is it pub because that was easier? Every public item is a promise.@ -184,0 +200,4 @@&& resp.hovered&& tree.focused_path.as_ref() != Some(&node.path){tree.focused_path = Some(node.path.clone());focused_pathis cloned on what looks like a hot path. Is the ownership forced here, or can this borrow?Nothing outside calls
scroll_into_view. It is pub(crate) inck-ui/src/components/tree.rsnow.It can borrow. The clone of
focused_pathwas left over from before the lifetime was threaded throughckeditor/src/panels/file_tree.rs, and it is gone.