"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: show base commit markers in tog log view
To:
Mark Jamsek <mark@jamsek.com>
Cc:
gameoftrees@openbsd.org
Date:
Sun, 23 Jul 2023 15:41:26 +0200

Download raw body.

Thread
  • Stefan Sperling:

    show base commit markers in tog log view

  • On Sun, Jul 23, 2023 at 11:17:38PM +1000, Mark Jamsek wrote:
    > But if we keep the author colour scheme all the way up to the '*' (as
    > in the below diff), it looks a bit better:
    > 
    >   https://ss.jamsek.net/20230723T230108-ss.png
    
    I prefer the above. Having the * appear in blue visually ties it to the
    author, which seems wrong to me. It should be tied to the commit.
    
    > Full disclosure: I haven't tested on a dark colour scheme so this could
    > be entirely the fault of my environment.
    
    My patch looked fine in a dark scheme but I agree that yours looks
    much better on a white background. It also looks fine in a dark
    terminal so your patch is ok by me, if you don't mind :)
    
    > diff /home/mark/src/got
    > commit - 6ed9ffec8b7318ac6f69a138854afefc48bca2c0
    > path + /home/mark/src/got
    > blob - 7850a8a50fe8ff23c3f0d68ab713639f97d85090
    > file + tog/tog.c
    > --- tog/tog.c
    > +++ tog/tog.c
    > @@ -2484,9 +2484,16 @@ draw_commit(struct tog_view *view, struct commit_queue
    >  	while (col < avail && author_width < author_display_cols + 2) {
    >  		if (tog_base_commit.id != NULL &&
    >  		    author_width == marker_column &&
    > -		    entry->idx == tog_base_commit.idx)
    > +		    entry->idx == tog_base_commit.idx) {
    > +			tc = get_color(&s->colors, TOG_COLOR_COMMIT);
    > +			if (tc)
    > +				wattr_on(view->window,
    > +				    COLOR_PAIR(tc->colorpair), NULL);
    >  			waddch(view->window, tog_base_commit.marker);
    > -		else
    > +			if (tc)
    > +				wattr_off(view->window,
    > +				    COLOR_PAIR(tc->colorpair), NULL);
    > +		} else
    >  			waddch(view->window, ' ');
    >  		col++;
    >  		author_width++;
    > 
    
    
  • Stefan Sperling:

    show base commit markers in tog log view