# [tig] [PATCH] Display line numbers in main view

2 messages from 2011-08-05 to 2011-08-29. Participants: Kumar Appaiah, Jonas Fonseca.
Thread: https://gitlist.dev/t/28024

## Kumar Appaiah, 2011-08-05 01:06

Subject: [tig] [PATCH] Display line numbers in main view
Message-ID: <20110805010616.GA16045@146653177.ece.utexas.edu>
URL: https://gitlist.dev/e/20110805010616.GA16045%40146653177.ece.utexas.edu

```
When line numbers are enabled, this enables the display of line
numbers in the main view as well. This is useful for cases where one
would want to quickly navigate to a particular commit by the ordering
displayed in tig, using the `:<num>' approach.
---
 tig.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/tig.c b/tig.c
index ed92400..92091ab 100644
--- a/tig.c
+++ b/tig.c
@@ -6194,6 +6194,9 @@ main_draw(struct view *view, struct line *line, unsigned int lineno)
 	if (!commit->author)
 		return FALSE;
 
+	if (opt_line_number && draw_lineno(view, lineno))
+		return TRUE;
+
 	if (draw_date(view, &commit->time))
 		return TRUE;
 
-- 
1.7.2.5

```

## Jonas Fonseca, 2011-08-29 03:16

Subject: Re: [tig] [PATCH] Display line numbers in main view
Message-ID: <CAFuPQ1LQgmOO=ziDZcJC9jMckCOu1NEHYM=R9HnMRXWzDuydZw@mail.gmail.com>
URL: https://gitlist.dev/e/CAFuPQ1LQgmOO%3DziDZcJC9jMckCOu1NEHYM%3DR9HnMRXWzDuydZw%40mail.gmail.com
In-Reply-To: <20110805010616.GA16045@146653177.ece.utexas.edu>

```
Applied, thanks!

On Thu, Aug 4, 2011 at 21:06, Kumar Appaiah <a.kumar@alumni.iitm.ac.in> wrote:
> When line numbers are enabled, this enables the display of line
> numbers in the main view as well. This is useful for cases where one
> would want to quickly navigate to a particular commit by the ordering
> displayed in tig, using the `:<num>' approach.
> ---
>  tig.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/tig.c b/tig.c
> index ed92400..92091ab 100644
> --- a/tig.c
> +++ b/tig.c
> @@ -6194,6 +6194,9 @@ main_draw(struct view *view, struct line *line, unsigned int lineno)
>        if (!commit->author)
>                return FALSE;
>
> +       if (opt_line_number && draw_lineno(view, lineno))
> +               return TRUE;
> +
>        if (draw_date(view, &commit->time))
>                return TRUE;
>
> --
> 1.7.2.5
>

-- 
Jonas Fonseca

```
