threads / patch / 17932

patchFix previous/next with branch+main view

Subject: [tig PATCH] Fix previous/next with branch+main view

## tl;dr

One message between Feb 21, 2009 and Feb 21, 2009. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Giuseppe Bilotta· Feb 21, 2009, 01:07 UTC · lore

If the main view was opened as a child window of branch view, the previous/next key would scroll the child window instead of the parent one, which was not consistent with other dual-window situations.

Fix by checking for a branch+main too when delegating the request.
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
---
 tig.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
Show changes to tig.c +3 −1
diff --git a/tig.c b/tig.c
index c22f271..ed2a49c 100644
--- a/tig.c
+++ b/tig.c
@@ -3223,7 +3223,9 @@ view_driver(struct view *view, enum request request)
 		   (view == VIEW(REQ_VIEW_STAGE) &&
 		     view->parent == VIEW(REQ_VIEW_STATUS)) ||
 		   (view == VIEW(REQ_VIEW_BLOB) &&
-		     view->parent == VIEW(REQ_VIEW_TREE))) {
+		     view->parent == VIEW(REQ_VIEW_TREE)) ||
+		   (view == VIEW(REQ_VIEW_MAIN) &&
+		     view->parent == VIEW(REQ_VIEW_BRANCH))) {
 			int line;
 
 			view = view->parent;
-- 
1.6.2.rc1.258.g1d592.dirty

← back to recent threads