git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* git-gui: Long lines in commit message gets hidden, no scrollbar appears
@ 2019-09-02  9:11 Birger Skogeng Pedersen
  2019-09-02 12:05 ` Bert Wesarg
  0 siblings, 1 reply; 18+ messages in thread
From: Birger Skogeng Pedersen @ 2019-09-02  9:11 UTC (permalink / raw)
  To: Git List

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears
  2019-09-02  9:11 git-gui: Long lines in commit message gets hidden, no scrollbar appears Birger Skogeng Pedersen
@ 2019-09-02 12:05 ` Bert Wesarg
  2019-09-02 17:04   ` Birger Skogeng Pedersen
  2019-09-02 17:35   ` Junio C Hamano
  0 siblings, 2 replies; 18+ messages in thread
From: Bert Wesarg @ 2019-09-02 12:05 UTC (permalink / raw)
  To: Birger Skogeng Pedersen; +Cc: Git List

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

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears
  2019-09-02 12:05 ` Bert Wesarg
@ 2019-09-02 17:04   ` Birger Skogeng Pedersen
  2019-09-02 18:12     ` Pratyush Yadav
  2019-09-02 17:35   ` Junio C Hamano
  1 sibling, 1 reply; 18+ messages in thread
From: Birger Skogeng Pedersen @ 2019-09-02 17:04 UTC (permalink / raw)
  To: Bert Wesarg; +Cc: Git List

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears
  2019-09-02 12:05 ` Bert Wesarg
  2019-09-02 17:04   ` Birger Skogeng Pedersen
@ 2019-09-02 17:35   ` Junio C Hamano
  2019-09-02 17:58     ` Bert Wesarg
  1 sibling, 1 reply; 18+ messages in thread
From: Junio C Hamano @ 2019-09-02 17:35 UTC (permalink / raw)
  To: Bert Wesarg; +Cc: Birger Skogeng Pedersen, Git List

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?

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears
  2019-09-02 17:35   ` Junio C Hamano
@ 2019-09-02 17:58     ` Bert Wesarg
  2019-09-02 18:51       ` Birger Skogeng Pedersen
  0 siblings, 1 reply; 18+ messages in thread
From: Bert Wesarg @ 2019-09-02 17:58 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Birger Skogeng Pedersen, Git List

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears
  2019-09-02 17:04   ` Birger Skogeng Pedersen
@ 2019-09-02 18:12     ` Pratyush Yadav
  2019-09-02 18:22       ` Birger Skogeng Pedersen
  0 siblings, 1 reply; 18+ messages in thread
From: Pratyush Yadav @ 2019-09-02 18:12 UTC (permalink / raw)
  To: Birger Skogeng Pedersen; +Cc: Bert Wesarg, Git List

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears
  2019-09-02 18:12     ` Pratyush Yadav
@ 2019-09-02 18:22       ` Birger Skogeng Pedersen
  2019-09-02 18:44         ` Pratyush Yadav
  0 siblings, 1 reply; 18+ messages in thread
From: Birger Skogeng Pedersen @ 2019-09-02 18:22 UTC (permalink / raw)
  To: Pratyush Yadav, Bert Wesarg, Git List

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears
  2019-09-02 18:22       ` Birger Skogeng Pedersen
@ 2019-09-02 18:44         ` Pratyush Yadav
  2019-09-02 18:58           ` Pratyush Yadav
  0 siblings, 1 reply; 18+ messages in thread
From: Pratyush Yadav @ 2019-09-02 18:44 UTC (permalink / raw)
  To: Birger Skogeng Pedersen; +Cc: Bert Wesarg, Git List

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears
  2019-09-02 17:58     ` Bert Wesarg
@ 2019-09-02 18:51       ` Birger Skogeng Pedersen
  0 siblings, 0 replies; 18+ messages in thread
From: Birger Skogeng Pedersen @ 2019-09-02 18:51 UTC (permalink / raw)
  To: Bert Wesarg; +Cc: Junio C Hamano, Git List

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears
  2019-09-02 18:44         ` Pratyush Yadav
@ 2019-09-02 18:58           ` Pratyush Yadav
  2019-09-02 19:03             ` Bert Wesarg
  2019-09-04  5:42             ` Birger Skogeng Pedersen
  0 siblings, 2 replies; 18+ messages in thread
From: Pratyush Yadav @ 2019-09-02 18:58 UTC (permalink / raw)
  To: Birger Skogeng Pedersen; +Cc: Bert Wesarg, Git List

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears
  2019-09-02 18:58           ` Pratyush Yadav
@ 2019-09-02 19:03             ` Bert Wesarg
  2019-09-02 19:13               ` Bert Wesarg
  2019-09-04  5:42             ` Birger Skogeng Pedersen
  1 sibling, 1 reply; 18+ messages in thread
From: Bert Wesarg @ 2019-09-02 19:03 UTC (permalink / raw)
  To: Pratyush Yadav; +Cc: Birger Skogeng Pedersen, Git List

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears
  2019-09-02 19:03             ` Bert Wesarg
@ 2019-09-02 19:13               ` Bert Wesarg
  2019-09-02 19:28                 ` Birger Skogeng Pedersen
  2019-09-03 17:15                 ` Pratyush Yadav
  0 siblings, 2 replies; 18+ messages in thread
From: Bert Wesarg @ 2019-09-02 19:13 UTC (permalink / raw)
  To: Pratyush Yadav; +Cc: Birger Skogeng Pedersen, Git List

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears
  2019-09-02 19:13               ` Bert Wesarg
@ 2019-09-02 19:28                 ` Birger Skogeng Pedersen
  2019-09-03 17:15                 ` Pratyush Yadav
  1 sibling, 0 replies; 18+ messages in thread
From: Birger Skogeng Pedersen @ 2019-09-02 19:28 UTC (permalink / raw)
  To: Bert Wesarg; +Cc: Git List

Bert,

Works great now. Thanks a lot for fixing this!

Birger

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears
  2019-09-02 19:13               ` Bert Wesarg
  2019-09-02 19:28                 ` Birger Skogeng Pedersen
@ 2019-09-03 17:15                 ` Pratyush Yadav
  2019-09-04 19:39                   ` Bert Wesarg
  1 sibling, 1 reply; 18+ messages in thread
From: Pratyush Yadav @ 2019-09-03 17:15 UTC (permalink / raw)
  To: Bert Wesarg; +Cc: Birger Skogeng Pedersen, Git List

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears
  2019-09-02 18:58           ` Pratyush Yadav
  2019-09-02 19:03             ` Bert Wesarg
@ 2019-09-04  5:42             ` Birger Skogeng Pedersen
  2019-09-04 14:04               ` Pratyush Yadav
  1 sibling, 1 reply; 18+ messages in thread
From: Birger Skogeng Pedersen @ 2019-09-04  5:42 UTC (permalink / raw)
  To: Pratyush Yadav; +Cc: Git List

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears
  2019-09-04  5:42             ` Birger Skogeng Pedersen
@ 2019-09-04 14:04               ` Pratyush Yadav
  0 siblings, 0 replies; 18+ messages in thread
From: Pratyush Yadav @ 2019-09-04 14:04 UTC (permalink / raw)
  To: Birger Skogeng Pedersen; +Cc: Git List

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears
  2019-09-03 17:15                 ` Pratyush Yadav
@ 2019-09-04 19:39                   ` Bert Wesarg
  2019-09-04 22:35                     ` Pratyush Yadav
  0 siblings, 1 reply; 18+ messages in thread
From: Bert Wesarg @ 2019-09-04 19:39 UTC (permalink / raw)
  To: Pratyush Yadav; +Cc: Birger Skogeng Pedersen, Git List

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears
  2019-09-04 19:39                   ` Bert Wesarg
@ 2019-09-04 22:35                     ` Pratyush Yadav
  0 siblings, 0 replies; 18+ messages in thread
From: Pratyush Yadav @ 2019-09-04 22:35 UTC (permalink / raw)
  To: Bert Wesarg; +Cc: Birger Skogeng Pedersen, Git List

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2019-09-04 22:35 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-02  9:11 git-gui: Long lines in commit message gets hidden, no scrollbar appears Birger Skogeng Pedersen
2019-09-02 12:05 ` Bert Wesarg
2019-09-02 17:04   ` Birger Skogeng Pedersen
2019-09-02 18:12     ` Pratyush Yadav
2019-09-02 18:22       ` Birger Skogeng Pedersen
2019-09-02 18:44         ` Pratyush Yadav
2019-09-02 18:58           ` Pratyush Yadav
2019-09-02 19:03             ` Bert Wesarg
2019-09-02 19:13               ` Bert Wesarg
2019-09-02 19:28                 ` Birger Skogeng Pedersen
2019-09-03 17:15                 ` Pratyush Yadav
2019-09-04 19:39                   ` Bert Wesarg
2019-09-04 22:35                     ` Pratyush Yadav
2019-09-04  5:42             ` Birger Skogeng Pedersen
2019-09-04 14:04               ` Pratyush Yadav
2019-09-02 17:35   ` Junio C Hamano
2019-09-02 17:58     ` Bert Wesarg
2019-09-02 18:51       ` Birger Skogeng Pedersen

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).