{"thread":{"id":"17932","subject":"[tig PATCH] Fix previous/next with branch+main view","startedAt":"2009-02-21T01:07:33Z","lastAt":"2009-02-21T01:07:33Z","messageCount":1,"participants":["Giuseppe Bilotta"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"105685","messageId":"1235178453-17785-1-git-send-email-giuseppe.bilotta@gmail.com","threadId":"17932","inReplyTo":null,"subject":"[tig PATCH] Fix previous/next with branch+main view","fromName":"Giuseppe Bilotta","fromEmail":"giuseppe.bilotta@gmail.com","sentAt":"2009-02-21T01:07:33Z","receivedAt":"2009-02-21T01:07:33Z","isPatch":true,"sender":{"key":"giuseppe.bilotta@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1464?v=4"},"body":"If the main view was opened as a child window of branch view, the\nprevious/next key would scroll the child window instead of the parent\none, which was not consistent with other dual-window situations.\n\nFix by checking for a branch+main too when delegating the request.\n\nSigned-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>\n---\n tig.c |    4 +++-\n 1 files changed, 3 insertions(+), 1 deletions(-)\n\ndiff --git a/tig.c b/tig.c\nindex c22f271..ed2a49c 100644\n--- a/tig.c\n+++ b/tig.c\n@@ -3223,7 +3223,9 @@ view_driver(struct view *view, enum request request)\n \t\t   (view == VIEW(REQ_VIEW_STAGE) &&\n \t\t     view->parent == VIEW(REQ_VIEW_STATUS)) ||\n \t\t   (view == VIEW(REQ_VIEW_BLOB) &&\n-\t\t     view->parent == VIEW(REQ_VIEW_TREE))) {\n+\t\t     view->parent == VIEW(REQ_VIEW_TREE)) ||\n+\t\t   (view == VIEW(REQ_VIEW_MAIN) &&\n+\t\t     view->parent == VIEW(REQ_VIEW_BRANCH))) {\n \t\t\tint line;\n \n \t\t\tview = view->parent;\n-- \n1.6.2.rc1.258.g1d592.dirty\n"}]}