git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [tig PATCH] Fix previous/next with branch+main view
@ 2009-02-21  1:07 Giuseppe Bilotta
  0 siblings, 0 replies; only message in thread
From: Giuseppe Bilotta @ 2009-02-21  1:07 UTC (permalink / raw)
  To: Jonas Fonseca; +Cc: git, Giuseppe Bilotta

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(-)

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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-02-21  1:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-21  1:07 [tig PATCH] Fix previous/next with branch+main view Giuseppe Bilotta

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).