mirror of
https://github.com/extrawurst/gitui.git
synced 2024-11-23 03:32:30 +03:00
right arrow in file tree convenience
This commit is contained in:
parent
599aa10b52
commit
0ec7552569
@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Changed
|
||||
- file trees: `arrow-right` on expanded folder moves down into folder
|
||||
|
||||
## [0.6.0] - 2020-06-09
|
||||
|
||||
![](assets/commit-details.gif)
|
||||
|
@ -199,11 +199,20 @@ impl StatusTree {
|
||||
let item_path =
|
||||
self.tree[current_selection].info.full_path.clone();
|
||||
|
||||
if matches!(item_kind, FileTreeItemKind::Path(PathCollapsed(collapsed))
|
||||
if collapsed)
|
||||
{
|
||||
self.expand(&item_path, current_selection);
|
||||
return SelectionChange::new(current_selection, true);
|
||||
match item_kind {
|
||||
FileTreeItemKind::Path(PathCollapsed(collapsed))
|
||||
if collapsed =>
|
||||
{
|
||||
self.expand(&item_path, current_selection);
|
||||
return SelectionChange::new(current_selection, true);
|
||||
}
|
||||
FileTreeItemKind::Path(PathCollapsed(collapsed))
|
||||
if !collapsed =>
|
||||
{
|
||||
return self
|
||||
.selection_updown(current_selection, false);
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
|
||||
SelectionChange::new(current_selection, false)
|
||||
|
Loading…
Reference in New Issue
Block a user