# git-gui: Long lines in commit message gets hidden, no scrollbar appears

18 messages from 2019-09-02 to 2019-09-04. Participants: Birger Skogeng Pedersen, Bert Wesarg, Junio C Hamano, Pratyush Yadav.
Thread: https://gitlist.dev/t/51786

## Birger Skogeng Pedersen, 2019-09-02 09:11

Subject: git-gui: Long lines in commit message gets hidden, no scrollbar appears
Message-ID: <CAGr--=+ThYVyZUiU1wnt0yL+MzF1RXvHnbwo9NWyh95cLyhNRQ@mail.gmail.com>
URL: https://gitlist.dev/e/CAGr--%3D%2BThYVyZUiU1wnt0yL%2BMzF1RXvHnbwo9NWyh95cLyhNRQ%40mail.gmail.com

```
Hi,

I just noticed that long lines in the commit message widget does in
fact not show a horizontal scrollbar.
So if a line in the commit message is more than 75 characters, it gets
a bit confusing.
Should it not have a scrollbar?
Example shown here: https://i.imgur.com/I3d6nBJ.png

```

## Bert Wesarg, 2019-09-02 12:05

Subject: Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears
Message-ID: <CAKPyHN1LJa8Zq6rZbOMZ-KxkqQYauQcvjv+rTrHt1_zwPZLZ-A@mail.gmail.com>
URL: https://gitlist.dev/e/CAKPyHN1LJa8Zq6rZbOMZ-KxkqQYauQcvjv%2BrTrHt1_zwPZLZ-A%40mail.gmail.com
In-Reply-To: <CAGr--=+ThYVyZUiU1wnt0yL+MzF1RXvHnbwo9NWyh95cLyhNRQ@mail.gmail.com>

```
Hi Birger,

On Mon, Sep 2, 2019 at 11:13 AM Birger Skogeng Pedersen
<birger.sp@gmail.com> wrote:
>
> Hi,
>
> I just noticed that long lines in the commit message widget does in
> fact not show a horizontal scrollbar.
> So if a line in the commit message is more than 75 characters, it gets
> a bit confusing.
> Should it not have a scrollbar?
> Example shown here: https://i.imgur.com/I3d6nBJ.png

the old reasoning was, that you should not create commit messages
which are too wide. While I can follow this reasoning, hiding content
is also not a good idea. Thus I tried a different aproach. Instead of
not showing the content, I pop up a dialog, if the commit message
contains too long lines and add you requested scrollbar.

As I'm currently unable to send patches per mail, I pushed it to GitHub:

https://github.com/bertwesarg/git-gui/tree/bw/commit-scrollbuffer

And I will paste the scrollbuffer commit below.

Best,
Bert

Author: Bert Wesarg <bert.wesarg@googlemail.com>
Date:   Mon Sep 2 13:57:24 2019 +0200

    git-gui: add horizontal scrollbar to commit buffer

    Sugestted-by: Birger Skogeng Pedersen <birger.sp@gmail.com>
    Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>

diff --git a/git-gui.sh b/git-gui.sh
index a491085..919d1e9 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -3363,14 +3363,20 @@ ttext $ui_comm -background white -foreground black \
        -relief sunken \
        -width $repo_config(gui.commitmsgwidth) -height 9 -wrap none \
        -font font_diff \
-       -yscrollcommand {.vpane.lower.commarea.buffer.frame.sby set}
+       -yscrollcommand {.vpane.lower.commarea.buffer.frame.sby set} \
+       -xscrollcommand {.vpane.lower.commarea.buffer.sbx set}
 ${NS}::scrollbar .vpane.lower.commarea.buffer.frame.sby \
+       -orient vertical \
        -command [list $ui_comm yview]
+${NS}::scrollbar .vpane.lower.commarea.buffer.sbx \
+       -orient horizontal \
+       -command [list $ui_comm xview]

 pack .vpane.lower.commarea.buffer.frame.sby -side right -fill y
 pack $ui_comm -side left -fill y
+pack .vpane.lower.commarea.buffer.sbx -side bottom -fill x
 pack .vpane.lower.commarea.buffer.header -side top -fill x
-pack .vpane.lower.commarea.buffer.frame -side left -fill y
+pack .vpane.lower.commarea.buffer.frame -side top -fill x
 pack .vpane.lower.commarea.buffer -side left -fill y

 # -- Commit Message Buffer Context Menu

```

## Birger Skogeng Pedersen, 2019-09-02 17:04

Subject: Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears
Message-ID: <CAGr--=+CEX-STDgT_ZwaA=n9UHSrsgcWnxCMY=9tGDA=9XLkew@mail.gmail.com>
URL: https://gitlist.dev/e/CAGr--%3D%2BCEX-STDgT_ZwaA%3Dn9UHSrsgcWnxCMY%3D9tGDA%3D9XLkew%40mail.gmail.com
In-Reply-To: <CAKPyHN1LJa8Zq6rZbOMZ-KxkqQYauQcvjv+rTrHt1_zwPZLZ-A@mail.gmail.com>

```
Hi Bert,


Thanks for picking this up.
I just gave your patch a go, and I think there are a couple of issues.


Applying the patch yields:

$ git apply patch1.patch
patch1.patch:18: indent with spaces.
       -yscrollcommand {.vpane.lower.commarea.buffer.frame.sby set} \
patch1.patch:19: indent with spaces.
       -xscrollcommand {.vpane.lower.commarea.buffer.sbx set}
patch1.patch:21: indent with spaces.
       -orient vertical \
patch1.patch:24: indent with spaces.
       -orient horizontal \
patch1.patch:25: indent with spaces.
       -command [list $ui_comm xview]
warning: git-gui.sh has type 100644, expected 100755
error: patch failed: git-gui.sh:3363
error: git-gui.sh: patch does not apply


Replacing the spaces with tabs before applying, I notice the
horisontal scrollbar appears to be "outside" of the text input area.
And it doesn't follow the height of the commit message text input
area.
Here's a screenshot: https://i.imgur.com/721axUX.png


Birger

On Mon, Sep 2, 2019 at 2:06 PM Bert Wesarg <bert.wesarg@googlemail.com> wrote:
>
> Hi Birger,
>
> On Mon, Sep 2, 2019 at 11:13 AM Birger Skogeng Pedersen
> <birger.sp@gmail.com> wrote:
> >
> > Hi,
> >
> > I just noticed that long lines in the commit message widget does in
> > fact not show a horizontal scrollbar.
> > So if a line in the commit message is more than 75 characters, it gets
> > a bit confusing.
> > Should it not have a scrollbar?
> > Example shown here: https://i.imgur.com/I3d6nBJ.png
>
> the old reasoning was, that you should not create commit messages
> which are too wide. While I can follow this reasoning, hiding content
> is also not a good idea. Thus I tried a different aproach. Instead of
> not showing the content, I pop up a dialog, if the commit message
> contains too long lines and add you requested scrollbar.
>
> As I'm currently unable to send patches per mail, I pushed it to GitHub:
>
> https://github.com/bertwesarg/git-gui/tree/bw/commit-scrollbuffer
>
> And I will paste the scrollbuffer commit below.
>
> Best,
> Bert
>
> Author: Bert Wesarg <bert.wesarg@googlemail.com>
> Date:   Mon Sep 2 13:57:24 2019 +0200
>
>     git-gui: add horizontal scrollbar to commit buffer
>
>     Sugestted-by: Birger Skogeng Pedersen <birger.sp@gmail.com>
>     Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
>
> diff --git a/git-gui.sh b/git-gui.sh
> index a491085..919d1e9 100755
> --- a/git-gui.sh
> +++ b/git-gui.sh
> @@ -3363,14 +3363,20 @@ ttext $ui_comm -background white -foreground black \
>         -relief sunken \
>         -width $repo_config(gui.commitmsgwidth) -height 9 -wrap none \
>         -font font_diff \
> -       -yscrollcommand {.vpane.lower.commarea.buffer.frame.sby set}
> +       -yscrollcommand {.vpane.lower.commarea.buffer.frame.sby set} \
> +       -xscrollcommand {.vpane.lower.commarea.buffer.sbx set}
>  ${NS}::scrollbar .vpane.lower.commarea.buffer.frame.sby \
> +       -orient vertical \
>         -command [list $ui_comm yview]
> +${NS}::scrollbar .vpane.lower.commarea.buffer.sbx \
> +       -orient horizontal \
> +       -command [list $ui_comm xview]
>
>  pack .vpane.lower.commarea.buffer.frame.sby -side right -fill y
>  pack $ui_comm -side left -fill y
> +pack .vpane.lower.commarea.buffer.sbx -side bottom -fill x
>  pack .vpane.lower.commarea.buffer.header -side top -fill x
> -pack .vpane.lower.commarea.buffer.frame -side left -fill y
> +pack .vpane.lower.commarea.buffer.frame -side top -fill x
>  pack .vpane.lower.commarea.buffer -side left -fill y
>
>  # -- Commit Message Buffer Context Menu

```

## Junio C Hamano, 2019-09-02 17:35

Subject: Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears
Message-ID: <xmqqa7bmvbwz.fsf@gitster-ct.c.googlers.com>
URL: https://gitlist.dev/e/xmqqa7bmvbwz.fsf%40gitster-ct.c.googlers.com
In-Reply-To: <CAKPyHN1LJa8Zq6rZbOMZ-KxkqQYauQcvjv+rTrHt1_zwPZLZ-A@mail.gmail.com>

```
Bert Wesarg <bert.wesarg@googlemail.com> writes:

> the old reasoning was, that you should not create commit messages
> which are too wide.

True, and that reasoning would justify hiding scrollbar when not
necessary to gain vertical space.  Can we arrange the scrollbar to
appear only when needed?

```

## Bert Wesarg, 2019-09-02 17:58

Subject: Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears
Message-ID: <CAKPyHN3FYR0FbDxnE4ru7OoK4w3OEE0g8tpoOqH-e+e1iTmcuA@mail.gmail.com>
URL: https://gitlist.dev/e/CAKPyHN3FYR0FbDxnE4ru7OoK4w3OEE0g8tpoOqH-e%2Be1iTmcuA%40mail.gmail.com
In-Reply-To: <xmqqa7bmvbwz.fsf@gitster-ct.c.googlers.com>

```
On Mon, Sep 2, 2019 at 7:35 PM Junio C Hamano <gitster@pobox.com> wrote:
>
> Bert Wesarg <bert.wesarg@googlemail.com> writes:
>
> > the old reasoning was, that you should not create commit messages
> > which are too wide.
>
> True, and that reasoning would justify hiding scrollbar when not
> necessary to gain vertical space.  Can we arrange the scrollbar to
> appear only when needed?

up to now, git-gui does not hide any scrollbars, if they are not
needed. IMHO, I would keep it that way, as I don't like the flicker
when it appears and disappears. Imagine you are typing in the bottom
line and than you typed too much. The scrollbar appears, your input
line jumps one up line (or is hidden behind the scrollbar), than you
remove the too long line, the scrollbar disappears again and your
input line jumps down again.

Bert

```

## Pratyush Yadav, 2019-09-02 18:12

Subject: Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears
Message-ID: <20190902181213.7jqvoyctdm26g34z@yadavpratyush.com>
URL: https://gitlist.dev/e/20190902181213.7jqvoyctdm26g34z%40yadavpratyush.com
In-Reply-To: <CAGr--=+CEX-STDgT_ZwaA=n9UHSrsgcWnxCMY=9tGDA=9XLkew@mail.gmail.com>

```
On 02/09/19 07:04PM, Birger Skogeng Pedersen wrote:
> Hi Bert,
> 
> 
> Thanks for picking this up.
> I just gave your patch a go, and I think there are a couple of issues.
> 
> 
> Applying the patch yields:
> 
> $ git apply patch1.patch
> patch1.patch:18: indent with spaces.
>        -yscrollcommand {.vpane.lower.commarea.buffer.frame.sby set} \
> patch1.patch:19: indent with spaces.
>        -xscrollcommand {.vpane.lower.commarea.buffer.sbx set}
> patch1.patch:21: indent with spaces.
>        -orient vertical \
> patch1.patch:24: indent with spaces.
>        -orient horizontal \
> patch1.patch:25: indent with spaces.
>        -command [list $ui_comm xview]
> warning: git-gui.sh has type 100644, expected 100755
> error: patch failed: git-gui.sh:3363
> error: git-gui.sh: patch does not apply
 
It applied fine for me. I got the patch from Bert's GitHub since he said 
he is "unable to send patches per mail". You can run

  wget https://github.com/bertwesarg/git-gui/commit/0bfa0645127c8242a260f1dfe45d7d4c310fa868.patch

to get the .patch file, and then apply that. Maybe his email client 
messed up somewhere, and that's why your patch has whitespace problems.

> Replacing the spaces with tabs before applying, I notice the
> horisontal scrollbar appears to be "outside" of the text input area.
> And it doesn't follow the height of the commit message text input
> area.
> Here's a screenshot: https://i.imgur.com/721axUX.png
 
Hmm, it looks fine for me. Which platform are you using? I am running it 
on Linux. Screenshot: https://imgur.com/sNp5Ktq

-- 
Regards,
Pratyush Yadav

```

## Birger Skogeng Pedersen, 2019-09-02 18:22

Subject: Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears
Message-ID: <CAGr--=JgqjC8FskqVFJTqAnQ5aq8J4z-Wje8s22VwBgVtkBF-Q@mail.gmail.com>
URL: https://gitlist.dev/e/CAGr--%3DJgqjC8FskqVFJTqAnQ5aq8J4z-Wje8s22VwBgVtkBF-Q%40mail.gmail.com
In-Reply-To: <20190902181213.7jqvoyctdm26g34z@yadavpratyush.com>

```
On Mon, Sep 2, 2019 at 8:05 PM Bert Wesarg <bert.wesarg@googlemail.com> wrote:
> I cannot test windows easily, it looks good on Linux Tcl /Tk 8.6:
>
> https://kgab.selfhost.eu/s/f38GX4caCZBj4mZ

On Mon, Sep 2, 2019 at 8:12 PM Pratyush Yadav <me@yadavpratyush.com> wrote:
> Hmm, it looks fine for me. Which platform are you using? I am running it
> on Linux. Screenshot: https://imgur.com/sNp5Ktq

Try resizing the bottom right pane of git gui, you should see that the
scrollbar remains at the bottom while the input area moves upwards.
If not, then it must be a windows-only problem.
From Bert's screenshot you can see that there is a (small) spacer
between the scrollbar and the input area.

Please have a look at this: https://i.imgur.com/unAflET.png


Br,
Birger

```

## Pratyush Yadav, 2019-09-02 18:44

Subject: Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears
Message-ID: <20190902184405.bfb5572iia2v2uwi@yadavpratyush.com>
URL: https://gitlist.dev/e/20190902184405.bfb5572iia2v2uwi%40yadavpratyush.com
In-Reply-To: <CAGr--=JgqjC8FskqVFJTqAnQ5aq8J4z-Wje8s22VwBgVtkBF-Q@mail.gmail.com>

```
On 02/09/19 08:22PM, Birger Skogeng Pedersen wrote:
> On Mon, Sep 2, 2019 at 8:05 PM Bert Wesarg <bert.wesarg@googlemail.com> wrote:
> > I cannot test windows easily, it looks good on Linux Tcl /Tk 8.6:
> >
> > https://kgab.selfhost.eu/s/f38GX4caCZBj4mZ
> 
> On Mon, Sep 2, 2019 at 8:12 PM Pratyush Yadav <me@yadavpratyush.com> wrote:
> > Hmm, it looks fine for me. Which platform are you using? I am running it
> > on Linux. Screenshot: https://imgur.com/sNp5Ktq
> 
> Try resizing the bottom right pane of git gui, you should see that the
> scrollbar remains at the bottom while the input area moves upwards.

Yes, I can reproduce the problem when I do this. Interestingly, the 
vertical scrollbar does move, the horizontal one (which Bert just added) 
doesn't. So I think there is a slight difference in how the horizontal 
scrollbar is set up that is causing this.

> If not, then it must be a windows-only problem.
> From Bert's screenshot you can see that there is a (small) spacer
> between the scrollbar and the input area.
> 
> Please have a look at this: https://i.imgur.com/unAflET.png
> 
> 
> Br,
> Birger

-- 
Regards,
Pratyush Yadav

```

## Birger Skogeng Pedersen, 2019-09-02 18:51

Subject: Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears
Message-ID: <CAGr--=JUGkYVLbEBd7tesa4K7R3pa3QLWQGAN5-vpjaKUBkr+w@mail.gmail.com>
URL: https://gitlist.dev/e/CAGr--%3DJUGkYVLbEBd7tesa4K7R3pa3QLWQGAN5-vpjaKUBkr%2Bw%40mail.gmail.com
In-Reply-To: <CAKPyHN3FYR0FbDxnE4ru7OoK4w3OEE0g8tpoOqH-e+e1iTmcuA@mail.gmail.com>

```
On Mon, Sep 2, 2019 at 7:58 PM Bert Wesarg <bert.wesarg@googlemail.com> wrote:
> up to now, git-gui does not hide any scrollbars, if they are not
> needed. IMHO, I would keep it that way, as I don't like the flicker
> when it appears and disappears. Imagine you are typing in the bottom
> line and than you typed too much. The scrollbar appears, your input
> line jumps one up line (or is hidden behind the scrollbar), than you
> remove the too long line, the scrollbar disappears again and your
> input line jumps down again.
>
> Bert
FWIW I strongly agree with this. Invisible scrollbars that pop up
(like you describe) are often quite annoying. I much prefer to just
keep them visible all the time, and disabled when there is nothing to
scroll.

Birger

```

## Pratyush Yadav, 2019-09-02 18:58

Subject: Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears
Message-ID: <20190902185819.fzf3lop6riiq6zja@yadavpratyush.com>
URL: https://gitlist.dev/e/20190902185819.fzf3lop6riiq6zja%40yadavpratyush.com
In-Reply-To: <20190902184405.bfb5572iia2v2uwi@yadavpratyush.com>

```
On 03/09/19 12:14AM, Pratyush Yadav wrote:
> On 02/09/19 08:22PM, Birger Skogeng Pedersen wrote:
> > On Mon, Sep 2, 2019 at 8:05 PM Bert Wesarg <bert.wesarg@googlemail.com> wrote:
> > > I cannot test windows easily, it looks good on Linux Tcl /Tk 8.6:
> > >
> > > https://kgab.selfhost.eu/s/f38GX4caCZBj4mZ
> > 
> > On Mon, Sep 2, 2019 at 8:12 PM Pratyush Yadav <me@yadavpratyush.com> wrote:
> > > Hmm, it looks fine for me. Which platform are you using? I am running it
> > > on Linux. Screenshot: https://imgur.com/sNp5Ktq
> > 
> > Try resizing the bottom right pane of git gui, you should see that the
> > scrollbar remains at the bottom while the input area moves upwards.
> 
> Yes, I can reproduce the problem when I do this. Interestingly, the 
> vertical scrollbar does move, the horizontal one (which Bert just added) 
> doesn't. So I think there is a slight difference in how the horizontal 
> scrollbar is set up that is causing this.
 
On second thought, wouldn't it make more sense to expand the commit 
message buffer instead? The point of resizing that pane is to see more 
of the commit message. So it makes more sense to make the commit message 
buffer take up all the vertical space, rather than making the scrollbar 
move.

-- 
Regards,
Pratyush Yadav

```

## Bert Wesarg, 2019-09-02 19:03

Subject: Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears
Message-ID: <CAKPyHN1GgXLy0+z=JbuyuSvVXsh6u5Po18OXizPNmfLE5AC00g@mail.gmail.com>
URL: https://gitlist.dev/e/CAKPyHN1GgXLy0%2Bz%3DJbuyuSvVXsh6u5Po18OXizPNmfLE5AC00g%40mail.gmail.com
In-Reply-To: <20190902185819.fzf3lop6riiq6zja@yadavpratyush.com>

```
On Mon, Sep 2, 2019 at 8:58 PM Pratyush Yadav <me@yadavpratyush.com> wrote:
>
> On 03/09/19 12:14AM, Pratyush Yadav wrote:
> > On 02/09/19 08:22PM, Birger Skogeng Pedersen wrote:
> > > On Mon, Sep 2, 2019 at 8:05 PM Bert Wesarg <bert.wesarg@googlemail.com> wrote:
> > > > I cannot test windows easily, it looks good on Linux Tcl /Tk 8.6:
> > > >
> > > > https://kgab.selfhost.eu/s/f38GX4caCZBj4mZ
> > >
> > > On Mon, Sep 2, 2019 at 8:12 PM Pratyush Yadav <me@yadavpratyush.com> wrote:
> > > > Hmm, it looks fine for me. Which platform are you using? I am running it
> > > > on Linux. Screenshot: https://imgur.com/sNp5Ktq
> > >
> > > Try resizing the bottom right pane of git gui, you should see that the
> > > scrollbar remains at the bottom while the input area moves upwards.
> >
> > Yes, I can reproduce the problem when I do this. Interestingly, the
> > vertical scrollbar does move, the horizontal one (which Bert just added)
> > doesn't. So I think there is a slight difference in how the horizontal
> > scrollbar is set up that is causing this.
>
> On second thought, wouldn't it make more sense to expand the commit
> message buffer instead? The point of resizing that pane is to see more
> of the commit message. So it makes more sense to make the commit message
> buffer take up all the vertical space, rather than making the scrollbar
> move.

it is, I just broke that ;-)

Bert

>
> --
> Regards,
> Pratyush Yadav

```

## Bert Wesarg, 2019-09-02 19:13

Subject: Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears
Message-ID: <CAKPyHN3=QY4+XNhQPq09_PALFwfR5bWBs7q6m6LkfFoW-xeCug@mail.gmail.com>
URL: https://gitlist.dev/e/CAKPyHN3%3DQY4%2BXNhQPq09_PALFwfR5bWBs7q6m6LkfFoW-xeCug%40mail.gmail.com
In-Reply-To: <CAKPyHN1GgXLy0+z=JbuyuSvVXsh6u5Po18OXizPNmfLE5AC00g@mail.gmail.com>

```
On Mon, Sep 2, 2019 at 9:03 PM Bert Wesarg <bert.wesarg@googlemail.com> wrote:
>
> On Mon, Sep 2, 2019 at 8:58 PM Pratyush Yadav <me@yadavpratyush.com> wrote:
> >
> > On 03/09/19 12:14AM, Pratyush Yadav wrote:
> > > On 02/09/19 08:22PM, Birger Skogeng Pedersen wrote:
> > > > On Mon, Sep 2, 2019 at 8:05 PM Bert Wesarg <bert.wesarg@googlemail.com> wrote:
> > > > > I cannot test windows easily, it looks good on Linux Tcl /Tk 8.6:
> > > > >
> > > > > https://kgab.selfhost.eu/s/f38GX4caCZBj4mZ
> > > >
> > > > On Mon, Sep 2, 2019 at 8:12 PM Pratyush Yadav <me@yadavpratyush.com> wrote:
> > > > > Hmm, it looks fine for me. Which platform are you using? I am running it
> > > > > on Linux. Screenshot: https://imgur.com/sNp5Ktq
> > > >
> > > > Try resizing the bottom right pane of git gui, you should see that the
> > > > scrollbar remains at the bottom while the input area moves upwards.
> > >
> > > Yes, I can reproduce the problem when I do this. Interestingly, the
> > > vertical scrollbar does move, the horizontal one (which Bert just added)
> > > doesn't. So I think there is a slight difference in how the horizontal
> > > scrollbar is set up that is causing this.
> >
> > On second thought, wouldn't it make more sense to expand the commit
> > message buffer instead? The point of resizing that pane is to see more
> > of the commit message. So it makes more sense to make the commit message
> > buffer take up all the vertical space, rather than making the scrollbar
> > move.
>
> it is, I just broke that ;-)

is fixed in GitHub:

    wget https://github.com/bertwesarg/git-gui/commit/56163547604f44688e208393f8941efaf5247d40.patch

Thanks.

Bert

>
> Bert
>
> >
> > --
> > Regards,
> > Pratyush Yadav

```

## Birger Skogeng Pedersen, 2019-09-02 19:28

Subject: Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears
Message-ID: <CAGr--=JL2+yMqO5Mr19Es+787qJ=eQpzEo77Pco7GOhjvuAa+w@mail.gmail.com>
URL: https://gitlist.dev/e/CAGr--%3DJL2%2ByMqO5Mr19Es%2B787qJ%3DeQpzEo77Pco7GOhjvuAa%2Bw%40mail.gmail.com
In-Reply-To: <CAKPyHN3=QY4+XNhQPq09_PALFwfR5bWBs7q6m6LkfFoW-xeCug@mail.gmail.com>

```
Bert,

Works great now. Thanks a lot for fixing this!

Birger

```

## Pratyush Yadav, 2019-09-03 17:15

Subject: Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears
Message-ID: <20190903171511.cd6vwn4kz7bdpose@yadavpratyush.com>
URL: https://gitlist.dev/e/20190903171511.cd6vwn4kz7bdpose%40yadavpratyush.com
In-Reply-To: <CAKPyHN3=QY4+XNhQPq09_PALFwfR5bWBs7q6m6LkfFoW-xeCug@mail.gmail.com>

```
On 02/09/19 09:13PM, Bert Wesarg wrote:
> On Mon, Sep 2, 2019 at 9:03 PM Bert Wesarg <bert.wesarg@googlemail.com> wrote:
> >
[snip]
> > > On second thought, wouldn't it make more sense to expand the 
> > > commit
> > > message buffer instead? The point of resizing that pane is to see more
> > > of the commit message. So it makes more sense to make the commit message
> > > buffer take up all the vertical space, rather than making the scrollbar
> > > move.
> >
> > it is, I just broke that ;-)
> 
> is fixed in GitHub:
> 
>     wget https://github.com/bertwesarg/git-gui/commit/56163547604f44688e208393f8941efaf5247d40.patch

I tried the patch out. Works fine on Linux. Thanks.

There is a minor typo in your commit message.

> Sugestted-by: Birger Skogeng Pedersen <birger.sp@gmail.com>

s/Sugestted/Suggested/

> Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>

One more observation:

If I write a particularly long line (and consequently the scrollbar 
becomes active), and then hit Ctrl+A to select all text, and then 
backspace to delete it all, the scrollbar does not get updated. It still 
shows the old position where is is "scrolled" halfway through. As soon 
as I type in any other character, it takes the correct state, and 
becomes disabled.

The vertical scrollbar behaves correctly in this scenario, and does take 
the correct state and position as soon as I delete all text, so I 
suspect it should be a small fix. Maybe a missed option or something 
like that?

-- 
Regards,
Pratyush Yadav

```

## Birger Skogeng Pedersen, 2019-09-04 05:42

Subject: Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears
Message-ID: <CAGr--=+UA04F8JtpN3b8SahYtVkYgR45j_xeb3759DrtQOY6rg@mail.gmail.com>
URL: https://gitlist.dev/e/CAGr--%3D%2BUA04F8JtpN3b8SahYtVkYgR45j_xeb3759DrtQOY6rg%40mail.gmail.com
In-Reply-To: <20190902185819.fzf3lop6riiq6zja@yadavpratyush.com>

```
Hi Pratyush,


Just wanted to chime in on this one:

On Mon, Sep 2, 2019 at 8:58 PM Pratyush Yadav <me@yadavpratyush.com> wrote:
> On second thought, wouldn't it make more sense to expand the commit
> message buffer instead? The point of resizing that pane is to see more
> of the commit message. So it makes more sense to make the commit message
> buffer take up all the vertical space, rather than making the scrollbar
> move.

I also think it makes sense to expand the commit message buffer. And
how about automatic word wrapping? Should the user really have to care
about the 72 character limit, while typing the commit message? I'm not
sure what solution would be best.


Birger

```

## Pratyush Yadav, 2019-09-04 14:04

Subject: Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears
Message-ID: <20190904140437.xcosp24kpo5fiufa@yadavpratyush.com>
URL: https://gitlist.dev/e/20190904140437.xcosp24kpo5fiufa%40yadavpratyush.com
In-Reply-To: <CAGr--=+UA04F8JtpN3b8SahYtVkYgR45j_xeb3759DrtQOY6rg@mail.gmail.com>

```
On 04/09/19 07:42AM, Birger Skogeng Pedersen wrote:
> Hi Pratyush,
> 
> 
> Just wanted to chime in on this one:
> 
> On Mon, Sep 2, 2019 at 8:58 PM Pratyush Yadav <me@yadavpratyush.com> wrote:
> > On second thought, wouldn't it make more sense to expand the commit
> > message buffer instead? The point of resizing that pane is to see more
> > of the commit message. So it makes more sense to make the commit message
> > buffer take up all the vertical space, rather than making the scrollbar
> > move.
> 
> I also think it makes sense to expand the commit message buffer. And

Yes, it was actually a bug. Bert fixed it in his re-roll.

> how about automatic word wrapping? Should the user really have to care
> about the 72 character limit, while typing the commit message? I'm not
> sure what solution would be best.

Yes, that would be a neat feature. Tcl/Tk's text boxes have a "word 
wrap" feature [0], but I'm not sure if that's a soft-wrap or a 
hard-wrap. We can try experimenting with those to see how well it works.  
It would also be a good idea to have an option to disable the word wrap.  
Maybe do that by setting the "Commit message text width" to 0.

[0] https://www.tcl.tk/man/tcl8.4/TkCmd/text.htm#M16

-- 
Regards,
Pratyush Yadav

```

## Bert Wesarg, 2019-09-04 19:39

Subject: Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears
Message-ID: <CAKPyHN39AXJBtuDepb-TgGSGrvqs4a5+yp74L5im3Svmw5S8aA@mail.gmail.com>
URL: https://gitlist.dev/e/CAKPyHN39AXJBtuDepb-TgGSGrvqs4a5%2Byp74L5im3Svmw5S8aA%40mail.gmail.com
In-Reply-To: <20190903171511.cd6vwn4kz7bdpose@yadavpratyush.com>

```
On Tue, Sep 3, 2019 at 7:15 PM Pratyush Yadav <me@yadavpratyush.com> wrote:
>
> On 02/09/19 09:13PM, Bert Wesarg wrote:
> > On Mon, Sep 2, 2019 at 9:03 PM Bert Wesarg <bert.wesarg@googlemail.com> wrote:
> > >
> [snip]
> > > > On second thought, wouldn't it make more sense to expand the
> > > > commit
> > > > message buffer instead? The point of resizing that pane is to see more
> > > > of the commit message. So it makes more sense to make the commit message
> > > > buffer take up all the vertical space, rather than making the scrollbar
> > > > move.
> > >
> > > it is, I just broke that ;-)
> >
> > is fixed in GitHub:
> >
> >     wget https://github.com/bertwesarg/git-gui/commit/56163547604f44688e208393f8941efaf5247d40.patch
>
> I tried the patch out. Works fine on Linux. Thanks.
>
> There is a minor typo in your commit message.
>
> > Sugestted-by: Birger Skogeng Pedersen <birger.sp@gmail.com>
>
> s/Sugestted/Suggested/
>
> > Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
>
> One more observation:
>
> If I write a particularly long line (and consequently the scrollbar
> becomes active), and then hit Ctrl+A to select all text, and then
> backspace to delete it all, the scrollbar does not get updated. It still
> shows the old position where is is "scrolled" halfway through. As soon
> as I type in any other character, it takes the correct state, and
> becomes disabled.
>
> The vertical scrollbar behaves correctly in this scenario, and does take
> the correct state and position as soon as I delete all text, so I
> suspect it should be a small fix. Maybe a missed option or something
> like that?

While I can reproduce this, I don't figured out what is wrong here. I
tried a minimal example and this also fails. The yScrollCommand is
issued, but the xScrollCommand not. I have tcl/tk 8.6.8 on Linux.

Bert

>
> --
> Regards,
> Pratyush Yadav

```

## Pratyush Yadav, 2019-09-04 22:35

Subject: Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears
Message-ID: <20190904223508.lmima7iv4pbbhg3z@yadavpratyush.com>
URL: https://gitlist.dev/e/20190904223508.lmima7iv4pbbhg3z%40yadavpratyush.com
In-Reply-To: <CAKPyHN39AXJBtuDepb-TgGSGrvqs4a5+yp74L5im3Svmw5S8aA@mail.gmail.com>

```
On 04/09/19 09:39PM, Bert Wesarg wrote:
> On Tue, Sep 3, 2019 at 7:15 PM Pratyush Yadav <me@yadavpratyush.com> wrote:
> >
> > On 02/09/19 09:13PM, Bert Wesarg wrote:
[snip]
> >
> > One more observation:
> >
> > If I write a particularly long line (and consequently the scrollbar
> > becomes active), and then hit Ctrl+A to select all text, and then
> > backspace to delete it all, the scrollbar does not get updated. It still
> > shows the old position where is is "scrolled" halfway through. As soon
> > as I type in any other character, it takes the correct state, and
> > becomes disabled.
> >
> > The vertical scrollbar behaves correctly in this scenario, and does take
> > the correct state and position as soon as I delete all text, so I
> > suspect it should be a small fix. Maybe a missed option or something
> > like that?
> 
> While I can reproduce this, I don't figured out what is wrong here. I
> tried a minimal example and this also fails. The yScrollCommand is
> issued, but the xScrollCommand not. I have tcl/tk 8.6.8 on Linux.

Well, I don't think this is a big enough problem to block this patch, 
but still something that should ideally be fixed.

I have a really busy week/weekend coming up, so I won't really be able 
to devote much time to this.  I'll see if I can figure something out 
after that.  I'll wait for some comments on your patches, and then get 
around to reading them myself when I get some more time.  Thanks.

-- 
Regards,
Pratyush Yadav

```
