Skip to content

Commit

Permalink
Fix navigation in split tree view
Browse files Browse the repository at this point in the history
Do not descend in directories when hovering the cursor in the tree view
while viewing a blob. To enter a directory, use <Tab> first to change
the active view.
  • Loading branch information
koutcher committed May 25, 2022
1 parent 06dd7a8 commit 7e8de4f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions NEWS.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Bug fixes:
- Use the full width for diffstat in the stage view.
- Improve escaping of variables in external commands.
- Fix cursor behaviour during staging. (#842, #1028)
- Fix navigation in split tree view.

tig-2.5.5
---------
Expand Down
4 changes: 3 additions & 1 deletion src/tig.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,9 @@ view_driver(struct view *view, enum request request)
move_view(parent, request);
if (view_is_displayed(parent))
update_view_title(parent);
if (line != parent->pos.lineno) {
if (line != parent->pos.lineno &&
!(parent == &tree_view &&
parent->line[parent->pos.lineno].type == LINE_DIRECTORY)) {
end_update(view, true);
view_request(parent, REQ_ENTER);
}
Expand Down

0 comments on commit 7e8de4f

Please sign in to comment.