summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f220410)
raw | patch | inline | side by side (parent: f220410)
author | Jonas Fonseca <fonseca@diku.dk> | |
Wed, 5 May 2010 00:01:58 +0000 (20:01 -0400) | ||
committer | Jonas Fonseca <fonseca@diku.dk> | |
Wed, 5 May 2010 00:01:58 +0000 (20:01 -0400) |
tig.c | patch | blob | history |
index f08117e58da7979dbaa57fe83bb0c7664d1cdd3d..074e4143184929aa1db735c009bb6554b8ecd812 100644 (file)
--- a/tig.c
+++ b/tig.c
#define view_is_displayed(view) \
(view == display[0] || view == display[1])
-#define view_has_parent(view, child_type, parent_type) \
- (view->type == child_type && view->parent && view->parent->type == parent_type)
-
static inline void
set_view_attr(struct view *view, enum line_type type)
{
case REQ_PREVIOUS:
request = request == REQ_NEXT ? REQ_MOVE_DOWN : REQ_MOVE_UP;
- if (view_has_parent(view, VIEW_DIFF, VIEW_MAIN) ||
- view_has_parent(view, VIEW_DIFF, VIEW_BLAME) ||
- view_has_parent(view, VIEW_STAGE, VIEW_STATUS) ||
- view_has_parent(view, VIEW_BLOB, VIEW_TREE) ||
- view_has_parent(view, VIEW_MAIN, VIEW_BRANCH)) {
+ if (view->parent) {
int line;
view = view->parent;