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

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

Download raw body.

Thread
  • Stefan Sperling:

    show base commit markers in tog log view

  • Stefan Sperling:

    show base commit markers in tog log view

  • Stefan Sperling <stsp@stsp.name> wrote:
    > 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.
    
    That's actually very true!
    
    > > 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 :)
    
    No, I definitely don't mind. In fact, I've been using tog with that
    patch since and it's really grown on me. And combined with your above
    argument, I actually think it's the better option now too :)
    
    (btw, I thought it might have something to do with my scheme; things
    can look very different from light to dark backgrounds. I've been
    meaning to try a dark terminal again but my brain struggles reading
    code on dark backgrounds!)
    
    > > 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++;
    > > 
    
    
    -- 
    Mark Jamsek <https://bsdbox.org>
    GPG: F2FF 13DE 6A06 C471 CA80  E6E2 2930 DC66 86EE CF68
    
  • Stefan Sperling:

    show base commit markers in tog log view

  • Stefan Sperling:

    show base commit markers in tog log view