From: Kumar Appaiah <a.kumar@alumni.iitm.ac.in>
To: git@vger.kernel.org, fonseca@diku.dk
Cc: Kumar Appaiah <a.kumar@alumni.iitm.ac.in>
Subject: [PATCH] Scroll diff with arrow keys in log view
Date: Wed, 31 Jul 2013 23:11:50 -0400 [thread overview]
Message-ID: <1375326710-2856-1-git-send-email-a.kumar@alumni.iitm.ac.in> (raw)
This commit introduces the VIEW_NO_PARENT_NAV flag and adds it to the
log view. This allows the scrolling commands to fall through from the
pager to the diff when the diff is viewed in the log mode.
Signed-Off-By: Kumar Appaiah <a.kumar@alumni.iitm.ac.in>
---
tig.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tig.c b/tig.c
index 8301295..52831fd 100644
--- a/tig.c
+++ b/tig.c
@@ -1895,6 +1895,7 @@ enum view_flag {
VIEW_STDIN = 1 << 8,
VIEW_SEND_CHILD_ENTER = 1 << 9,
VIEW_FILE_FILTER = 1 << 10,
+ VIEW_NO_PARENT_NAV = 1 << 11,
};
#define view_has_flags(view, flag) ((view)->ops->flags & (flag))
@@ -3765,7 +3766,7 @@ view_driver(struct view *view, enum request request)
case REQ_NEXT:
case REQ_PREVIOUS:
- if (view->parent) {
+ if (view->parent && !view_has_flags(view->parent, VIEW_NO_PARENT_NAV)) {
int line;
view = view->parent;
@@ -4431,7 +4432,7 @@ log_request(struct view *view, enum request request, struct line *line)
static struct view_ops log_ops = {
"line",
{ "log" },
- VIEW_ADD_PAGER_REFS | VIEW_OPEN_DIFF | VIEW_SEND_CHILD_ENTER,
+ VIEW_ADD_PAGER_REFS | VIEW_OPEN_DIFF | VIEW_SEND_CHILD_ENTER | VIEW_NO_PARENT_NAV,
0,
log_open,
pager_read,
--
1.8.3.2
reply other threads:[~2013-08-01 3:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1375326710-2856-1-git-send-email-a.kumar@alumni.iitm.ac.in \
--to=a.kumar@alumni.iitm.ac.in \
--cc=fonseca@diku.dk \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).