git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Date
Feb 21, 2009, 01:07 UTC
Message-ID
<1235178453-17785-1-git-send-email-giuseppe.bilotta@gmail.com>

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
Message 1 of 1 in “Fix previous/next with branch+main view”
  1. Fix previous/next with branch+main viewGiuseppe Bilotta, Feb 21, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.