Code

status window: mention 'u' instead of Enter
authorJeff King <peff@peff.net>
Fri, 10 Aug 2007 17:58:43 +0000 (19:58 +0200)
committerJonas Fonseca <fonseca@diku.dk>
Fri, 10 Aug 2007 17:58:43 +0000 (19:58 +0200)
Commits ca1d71ea and 89d917a bound the Enter functionality
to 'u' (and Enter now shows the diff).

[ Slightly changed to use get_key(). --jonas ]

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
tig.c

diff --git a/tig.c b/tig.c
index d9c9df8b947765364652b9c4d144395ff52a88b1..b9c10abe8b020920ddad8bc0049a0372ed976752 100644 (file)
--- a/tig.c
+++ b/tig.c
@@ -3156,15 +3156,15 @@ status_select(struct view *view, struct line *line)
 
        switch (line->type) {
        case LINE_STAT_STAGED:
-               text = "Press Enter to unstage file for commit";
+               text = "Press %s to unstage file for commit";
                break;
 
        case LINE_STAT_UNSTAGED:
-               text = "Press Enter to stage file for commit  ";
+               text = "Press %s to stage file for commit  ";
                break;
 
        case LINE_STAT_UNTRACKED:
-               text = "Press Enter to stage file for addition";
+               text = "Press %s to stage file for addition";
                break;
 
        case LINE_STAT_NONE:
@@ -3174,7 +3174,7 @@ status_select(struct view *view, struct line *line)
                die("w00t");
        }
 
-       string_ncopy(view->ref, text, strlen(text));
+       string_format(view->ref, text, get_key(REQ_STATUS_UPDATE));
 }
 
 static bool