summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 96c65b4)
raw | patch | inline | side by side (parent: 96c65b4)
author | Jonas Fonseca <fonseca@diku.dk> | |
Sat, 7 Feb 2009 14:20:57 +0000 (15:20 +0100) | ||
committer | Jonas Fonseca <fonseca@diku.dk> | |
Sat, 7 Feb 2009 20:23:55 +0000 (21:23 +0100) |
NEWS | patch | blob | history | |
tig.c | patch | blob | history |
index 39ad78423a13427452a9545b9c2145b2e46804b5..0e829203bad868c0eee0837e35bbd88a50d61e80 100644 (file)
--- a/NEWS
+++ b/NEWS
- Status view: improve "on branch" information inspired by the prompt
code in git's bash completion script.
- Colors for 256-capable terminals can be specified as colorN.
+ - Entering a number in the prompt will jump to that line number.
tig-0.14
--------
index 38daacee531fdc4eabd4f1e4a5d59e1291ef35ff..8a55aab9288ab2c3ea861c619649324937f27a9e 100644 (file)
--- a/tig.c
+++ b/tig.c
{
char *cmd = read_prompt(":");
- if (cmd) {
+ if (cmd && isdigit(*cmd)) {
+ int lineno = view->lineno + 1;
+
+ if (parse_int(&lineno, cmd, 1, view->lines + 1) == OK) {
+ select_view_line(view, lineno - 1);
+ report("");
+ } else {
+ report("Unable to parse '%s' as a line number", cmd);
+ }
+
+ } else if (cmd) {
struct view *next = VIEW(REQ_VIEW_PAGER);
const char *argv[SIZEOF_ARG] = { "git" };
int argc = 1;