git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Sergey Grunenko <grunenko.serg@gmail.com>, git@vger.kernel.org
Subject: Re: [BUG] "git log" command wraps lines not correctly while terminal width changed
Date: Fri, 29 Jul 2022 14:12:07 -0700	[thread overview]
Message-ID: <xmqq4jyz62u0.fsf@gitster.g> (raw)
In-Reply-To: <YuRF7rSskqT2YkMs@coredump.intra.peff.net> (Jeff King's message of "Fri, 29 Jul 2022 16:41:18 -0400")

Jeff King <peff@peff.net> writes:

> On Fri, Jul 29, 2022 at 06:35:20PM +0400, Sergey Grunenko wrote:
>
>> Hi, developers. I met some small bug in console report of "git log" command
>
> I don't think this is a bug in git, because git isn't actually doing any
> wrapping.

We do measure the terminal width when we start and adjust the length
of --stat and other things, but it does not affect the overall
correctness of what you said.  We just draw once, and never go back
to redraw with updated width in response to SIGWINCH.  After we emit
our output, it is up to the pager and the terminal.

> OK, so it sounds like you're probably seeing "less" get told by the
> terminal that the window size has changed, and it adapts.
> ...
> The mouse scroll wheel is presumably telling the terminal to move
> through its back-scroll. How it handles re-rendering of content that's
> only in the back-scroll is up to it, and totally outside the control of
> either git or the pager. It behaves as your 8a for me, using urxvt on
> Linux. You probably need to file a report with the provider of your
> terminal emulator.


      reply	other threads:[~2022-07-29 21:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-29 14:35 [BUG] "git log" command wraps lines not correctly while terminal width changed Sergey Grunenko
2022-07-29 20:41 ` Jeff King
2022-07-29 21:12   ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq4jyz62u0.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=grunenko.serg@gmail.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).