Skip to content

Commit

Permalink
Handle merge navigation in main view
Browse files Browse the repository at this point in the history
Handle merge ops in main view and emit a message when they are
encountered outside.

As per review: jonas#525 (comment)
  • Loading branch information
phi-gamma committed Oct 22, 2016
1 parent b8ae837 commit 7ec4d5d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "tig/stage.h"
#include "tig/main.h"
#include "tig/diff.h"
#include "tig/search.h"

/*
* Main view backend
Expand Down Expand Up @@ -536,6 +537,11 @@ main_request(struct view *view, enum request request, struct line *line)
goto_id(view, "%(commit)^", true, false);
break;

case REQ_MOVE_NEXT_MERGE:
case REQ_MOVE_PREV_MERGE:
find_merge(view, request);
break;

default:
return request;
}
Expand Down
2 changes: 1 addition & 1 deletion src/tig.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ view_driver(struct view *view, enum request request)

case REQ_MOVE_NEXT_MERGE:
case REQ_MOVE_PREV_MERGE:
find_merge(view, request);
report("Moving between merge commits is not supported by the %s view", view->name);
break;

case REQ_STOP_LOADING:
Expand Down

0 comments on commit 7ec4d5d

Please sign in to comment.