Permalink
Browse files

Stage view: open untracked file at selected line

  • Loading branch information...
1 parent a14ad94 commit 123da8482336c6da44166d1b739752f582ae84e3 @jonas committed Feb 25, 2013
Showing with 5 additions and 1 deletion.
  1. +5 −1 tig.c
View
6 tig.c
@@ -7033,7 +7033,11 @@ stage_request(struct view *view, enum request request, struct line *line)
return REQ_NONE;
}
- open_editor(stage_status.new.name, diff_get_lineno(view, line));
+ if (stage_line_type == LINE_STAT_UNTRACKED) {
+ open_editor(stage_status.new.name, (line - view->line) + 1);
+ } else {
+ open_editor(stage_status.new.name, diff_get_lineno(view, line));
+ }
break;
case REQ_REFRESH:

0 comments on commit 123da84

Please sign in to comment.