{"thread":{"id":"34582","subject":"[PATCH] Scroll diff with arrow keys in log view","startedAt":"2013-08-01T03:11:50Z","lastAt":"2013-08-01T03:11:50Z","messageCount":1,"participants":["Kumar Appaiah"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"224414","messageId":"1375326710-2856-1-git-send-email-a.kumar@alumni.iitm.ac.in","threadId":"34582","inReplyTo":null,"subject":"[PATCH] Scroll diff with arrow keys in log view","fromName":"Kumar Appaiah","fromEmail":"a.kumar@alumni.iitm.ac.in","sentAt":"2013-08-01T03:11:50Z","receivedAt":"2013-08-01T03:11:50Z","isPatch":true,"sender":{"key":"a.kumar@alumni.iitm.ac.in","avatar":"https://gravatar.com/avatar/7ce299108bfff26792729bde4a1dd0638292f852a042d40a0a1991ff2ae58b0b?d=mp&s=160"},"body":"This commit introduces the VIEW_NO_PARENT_NAV flag and adds it to the\nlog view. This allows the scrolling commands to fall through from the\npager to the diff when the diff is viewed in the log mode.\n\nSigned-Off-By: Kumar Appaiah <a.kumar@alumni.iitm.ac.in>\n---\n tig.c | 5 +++--\n 1 file changed, 3 insertions(+), 2 deletions(-)\n\ndiff --git a/tig.c b/tig.c\nindex 8301295..52831fd 100644\n--- a/tig.c\n+++ b/tig.c\n@@ -1895,6 +1895,7 @@ enum view_flag {\n \tVIEW_STDIN\t\t= 1 << 8,\n \tVIEW_SEND_CHILD_ENTER\t= 1 << 9,\n \tVIEW_FILE_FILTER\t= 1 << 10,\n+\tVIEW_NO_PARENT_NAV      = 1 << 11,\n };\n \n #define view_has_flags(view, flag)\t((view)->ops->flags & (flag))\n@@ -3765,7 +3766,7 @@ view_driver(struct view *view, enum request request)\n \n \tcase REQ_NEXT:\n \tcase REQ_PREVIOUS:\n-\t\tif (view->parent) {\n+\t\tif (view->parent && !view_has_flags(view->parent, VIEW_NO_PARENT_NAV)) {\n \t\t\tint line;\n \n \t\t\tview = view->parent;\n@@ -4431,7 +4432,7 @@ log_request(struct view *view, enum request request, struct line *line)\n static struct view_ops log_ops = {\n \t\"line\",\n \t{ \"log\" },\n-\tVIEW_ADD_PAGER_REFS | VIEW_OPEN_DIFF | VIEW_SEND_CHILD_ENTER,\n+\tVIEW_ADD_PAGER_REFS | VIEW_OPEN_DIFF | VIEW_SEND_CHILD_ENTER | VIEW_NO_PARENT_NAV,\n \t0,\n \tlog_open,\n \tpager_read,\n-- \n1.8.3.2\n"}]}