{"thread":{"id":"51786","subject":"git-gui: Long lines in commit message gets hidden, no scrollbar appears","startedAt":"2019-09-02T09:13:32Z","lastAt":"2019-09-04T22:35:16Z","messageCount":18,"participants":["Birger Skogeng Pedersen","Bert Wesarg","Junio C Hamano","Pratyush Yadav"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"381642","messageId":"CAGr--=+ThYVyZUiU1wnt0yL+MzF1RXvHnbwo9NWyh95cLyhNRQ@mail.gmail.com","threadId":"51786","inReplyTo":null,"subject":"git-gui: Long lines in commit message gets hidden, no scrollbar appears","fromName":"Birger Skogeng Pedersen","fromEmail":"birger.sp@gmail.com","sentAt":"2019-09-02T09:11:09Z","receivedAt":"2019-09-02T09:13:32Z","isPatch":false,"sender":{"key":"birger.sp@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5260237?v=4"},"body":"Hi,\n\nI just noticed that long lines in the commit message widget does in\nfact not show a horizontal scrollbar.\nSo if a line in the commit message is more than 75 characters, it gets\na bit confusing.\nShould it not have a scrollbar?\nExample shown here: https://i.imgur.com/I3d6nBJ.png\n"},{"id":"381644","messageId":"CAKPyHN1LJa8Zq6rZbOMZ-KxkqQYauQcvjv+rTrHt1_zwPZLZ-A@mail.gmail.com","threadId":"51786","inReplyTo":"CAGr--=+ThYVyZUiU1wnt0yL+MzF1RXvHnbwo9NWyh95cLyhNRQ@mail.gmail.com","subject":"Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears","fromName":"Bert Wesarg","fromEmail":"bert.wesarg@googlemail.com","sentAt":"2019-09-02T12:05:55Z","receivedAt":"2019-09-02T12:06:08Z","isPatch":false,"sender":{"key":"bert.wesarg@googlemail.com","avatar":"https://avatars.githubusercontent.com/u/111934?v=4"},"body":"Hi Birger,\n\nOn Mon, Sep 2, 2019 at 11:13 AM Birger Skogeng Pedersen\n<birger.sp@gmail.com> wrote:\n>\n> Hi,\n>\n> I just noticed that long lines in the commit message widget does in\n> fact not show a horizontal scrollbar.\n> So if a line in the commit message is more than 75 characters, it gets\n> a bit confusing.\n> Should it not have a scrollbar?\n> Example shown here: https://i.imgur.com/I3d6nBJ.png\n\nthe old reasoning was, that you should not create commit messages\nwhich are too wide. While I can follow this reasoning, hiding content\nis also not a good idea. Thus I tried a different aproach. Instead of\nnot showing the content, I pop up a dialog, if the commit message\ncontains too long lines and add you requested scrollbar.\n\nAs I'm currently unable to send patches per mail, I pushed it to GitHub:\n\nhttps://github.com/bertwesarg/git-gui/tree/bw/commit-scrollbuffer\n\nAnd I will paste the scrollbuffer commit below.\n\nBest,\nBert\n\nAuthor: Bert Wesarg <bert.wesarg@googlemail.com>\nDate:   Mon Sep 2 13:57:24 2019 +0200\n\n    git-gui: add horizontal scrollbar to commit buffer\n\n    Sugestted-by: Birger Skogeng Pedersen <birger.sp@gmail.com>\n    Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>\n\ndiff --git a/git-gui.sh b/git-gui.sh\nindex a491085..919d1e9 100755\n--- a/git-gui.sh\n+++ b/git-gui.sh\n@@ -3363,14 +3363,20 @@ ttext $ui_comm -background white -foreground black \\\n        -relief sunken \\\n        -width $repo_config(gui.commitmsgwidth) -height 9 -wrap none \\\n        -font font_diff \\\n-       -yscrollcommand {.vpane.lower.commarea.buffer.frame.sby set}\n+       -yscrollcommand {.vpane.lower.commarea.buffer.frame.sby set} \\\n+       -xscrollcommand {.vpane.lower.commarea.buffer.sbx set}\n ${NS}::scrollbar .vpane.lower.commarea.buffer.frame.sby \\\n+       -orient vertical \\\n        -command [list $ui_comm yview]\n+${NS}::scrollbar .vpane.lower.commarea.buffer.sbx \\\n+       -orient horizontal \\\n+       -command [list $ui_comm xview]\n\n pack .vpane.lower.commarea.buffer.frame.sby -side right -fill y\n pack $ui_comm -side left -fill y\n+pack .vpane.lower.commarea.buffer.sbx -side bottom -fill x\n pack .vpane.lower.commarea.buffer.header -side top -fill x\n-pack .vpane.lower.commarea.buffer.frame -side left -fill y\n+pack .vpane.lower.commarea.buffer.frame -side top -fill x\n pack .vpane.lower.commarea.buffer -side left -fill y\n\n # -- Commit Message Buffer Context Menu\n"},{"id":"381658","messageId":"CAGr--=+CEX-STDgT_ZwaA=n9UHSrsgcWnxCMY=9tGDA=9XLkew@mail.gmail.com","threadId":"51786","inReplyTo":"CAKPyHN1LJa8Zq6rZbOMZ-KxkqQYauQcvjv+rTrHt1_zwPZLZ-A@mail.gmail.com","subject":"Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears","fromName":"Birger Skogeng Pedersen","fromEmail":"birger.sp@gmail.com","sentAt":"2019-09-02T17:04:21Z","receivedAt":"2019-09-02T17:04:38Z","isPatch":false,"sender":{"key":"birger.sp@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5260237?v=4"},"body":"Hi Bert,\n\n\nThanks for picking this up.\nI just gave your patch a go, and I think there are a couple of issues.\n\n\nApplying the patch yields:\n\n$ git apply patch1.patch\npatch1.patch:18: indent with spaces.\n       -yscrollcommand {.vpane.lower.commarea.buffer.frame.sby set} \\\npatch1.patch:19: indent with spaces.\n       -xscrollcommand {.vpane.lower.commarea.buffer.sbx set}\npatch1.patch:21: indent with spaces.\n       -orient vertical \\\npatch1.patch:24: indent with spaces.\n       -orient horizontal \\\npatch1.patch:25: indent with spaces.\n       -command [list $ui_comm xview]\nwarning: git-gui.sh has type 100644, expected 100755\nerror: patch failed: git-gui.sh:3363\nerror: git-gui.sh: patch does not apply\n\n\nReplacing the spaces with tabs before applying, I notice the\nhorisontal scrollbar appears to be \"outside\" of the text input area.\nAnd it doesn't follow the height of the commit message text input\narea.\nHere's a screenshot: https://i.imgur.com/721axUX.png\n\n\nBirger\n\nOn Mon, Sep 2, 2019 at 2:06 PM Bert Wesarg <bert.wesarg@googlemail.com> wrote:\n>\n> Hi Birger,\n>\n> On Mon, Sep 2, 2019 at 11:13 AM Birger Skogeng Pedersen\n> <birger.sp@gmail.com> wrote:\n> >\n> > Hi,\n> >\n> > I just noticed that long lines in the commit message widget does in\n> > fact not show a horizontal scrollbar.\n> > So if a line in the commit message is more than 75 characters, it gets\n> > a bit confusing.\n> > Should it not have a scrollbar?\n> > Example shown here: https://i.imgur.com/I3d6nBJ.png\n>\n> the old reasoning was, that you should not create commit messages\n> which are too wide. While I can follow this reasoning, hiding content\n> is also not a good idea. Thus I tried a different aproach. Instead of\n> not showing the content, I pop up a dialog, if the commit message\n> contains too long lines and add you requested scrollbar.\n>\n> As I'm currently unable to send patches per mail, I pushed it to GitHub:\n>\n> https://github.com/bertwesarg/git-gui/tree/bw/commit-scrollbuffer\n>\n> And I will paste the scrollbuffer commit below.\n>\n> Best,\n> Bert\n>\n> Author: Bert Wesarg <bert.wesarg@googlemail.com>\n> Date:   Mon Sep 2 13:57:24 2019 +0200\n>\n>     git-gui: add horizontal scrollbar to commit buffer\n>\n>     Sugestted-by: Birger Skogeng Pedersen <birger.sp@gmail.com>\n>     Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>\n>\n> diff --git a/git-gui.sh b/git-gui.sh\n> index a491085..919d1e9 100755\n> --- a/git-gui.sh\n> +++ b/git-gui.sh\n> @@ -3363,14 +3363,20 @@ ttext $ui_comm -background white -foreground black \\\n>         -relief sunken \\\n>         -width $repo_config(gui.commitmsgwidth) -height 9 -wrap none \\\n>         -font font_diff \\\n> -       -yscrollcommand {.vpane.lower.commarea.buffer.frame.sby set}\n> +       -yscrollcommand {.vpane.lower.commarea.buffer.frame.sby set} \\\n> +       -xscrollcommand {.vpane.lower.commarea.buffer.sbx set}\n>  ${NS}::scrollbar .vpane.lower.commarea.buffer.frame.sby \\\n> +       -orient vertical \\\n>         -command [list $ui_comm yview]\n> +${NS}::scrollbar .vpane.lower.commarea.buffer.sbx \\\n> +       -orient horizontal \\\n> +       -command [list $ui_comm xview]\n>\n>  pack .vpane.lower.commarea.buffer.frame.sby -side right -fill y\n>  pack $ui_comm -side left -fill y\n> +pack .vpane.lower.commarea.buffer.sbx -side bottom -fill x\n>  pack .vpane.lower.commarea.buffer.header -side top -fill x\n> -pack .vpane.lower.commarea.buffer.frame -side left -fill y\n> +pack .vpane.lower.commarea.buffer.frame -side top -fill x\n>  pack .vpane.lower.commarea.buffer -side left -fill y\n>\n>  # -- Commit Message Buffer Context Menu\n"},{"id":"381662","messageId":"xmqqa7bmvbwz.fsf@gitster-ct.c.googlers.com","threadId":"51786","inReplyTo":"CAKPyHN1LJa8Zq6rZbOMZ-KxkqQYauQcvjv+rTrHt1_zwPZLZ-A@mail.gmail.com","subject":"Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-09-02T17:35:40Z","receivedAt":"2019-09-02T17:35:48Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Bert Wesarg <bert.wesarg@googlemail.com> writes:\n\n> the old reasoning was, that you should not create commit messages\n> which are too wide.\n\nTrue, and that reasoning would justify hiding scrollbar when not\nnecessary to gain vertical space.  Can we arrange the scrollbar to\nappear only when needed?\n"},{"id":"381665","messageId":"CAKPyHN3FYR0FbDxnE4ru7OoK4w3OEE0g8tpoOqH-e+e1iTmcuA@mail.gmail.com","threadId":"51786","inReplyTo":"xmqqa7bmvbwz.fsf@gitster-ct.c.googlers.com","subject":"Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears","fromName":"Bert Wesarg","fromEmail":"bert.wesarg@googlemail.com","sentAt":"2019-09-02T17:58:29Z","receivedAt":"2019-09-02T17:58:43Z","isPatch":false,"sender":{"key":"bert.wesarg@googlemail.com","avatar":"https://avatars.githubusercontent.com/u/111934?v=4"},"body":"On Mon, Sep 2, 2019 at 7:35 PM Junio C Hamano <gitster@pobox.com> wrote:\n>\n> Bert Wesarg <bert.wesarg@googlemail.com> writes:\n>\n> > the old reasoning was, that you should not create commit messages\n> > which are too wide.\n>\n> True, and that reasoning would justify hiding scrollbar when not\n> necessary to gain vertical space.  Can we arrange the scrollbar to\n> appear only when needed?\n\nup to now, git-gui does not hide any scrollbars, if they are not\nneeded. IMHO, I would keep it that way, as I don't like the flicker\nwhen it appears and disappears. Imagine you are typing in the bottom\nline and than you typed too much. The scrollbar appears, your input\nline jumps one up line (or is hidden behind the scrollbar), than you\nremove the too long line, the scrollbar disappears again and your\ninput line jumps down again.\n\nBert\n"},{"id":"381668","messageId":"20190902181213.7jqvoyctdm26g34z@yadavpratyush.com","threadId":"51786","inReplyTo":"CAGr--=+CEX-STDgT_ZwaA=n9UHSrsgcWnxCMY=9tGDA=9XLkew@mail.gmail.com","subject":"Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears","fromName":"Pratyush Yadav","fromEmail":"me@yadavpratyush.com","sentAt":"2019-09-02T18:12:13Z","receivedAt":"2019-09-02T18:12:18Z","isPatch":false,"sender":{"key":"me@yadavpratyush.com","avatar":"https://avatars.githubusercontent.com/u/8817931?v=4"},"body":"On 02/09/19 07:04PM, Birger Skogeng Pedersen wrote:\n> Hi Bert,\n> \n> \n> Thanks for picking this up.\n> I just gave your patch a go, and I think there are a couple of issues.\n> \n> \n> Applying the patch yields:\n> \n> $ git apply patch1.patch\n> patch1.patch:18: indent with spaces.\n>        -yscrollcommand {.vpane.lower.commarea.buffer.frame.sby set} \\\n> patch1.patch:19: indent with spaces.\n>        -xscrollcommand {.vpane.lower.commarea.buffer.sbx set}\n> patch1.patch:21: indent with spaces.\n>        -orient vertical \\\n> patch1.patch:24: indent with spaces.\n>        -orient horizontal \\\n> patch1.patch:25: indent with spaces.\n>        -command [list $ui_comm xview]\n> warning: git-gui.sh has type 100644, expected 100755\n> error: patch failed: git-gui.sh:3363\n> error: git-gui.sh: patch does not apply\n \nIt applied fine for me. I got the patch from Bert's GitHub since he said \nhe is \"unable to send patches per mail\". You can run\n\n  wget https://github.com/bertwesarg/git-gui/commit/0bfa0645127c8242a260f1dfe45d7d4c310fa868.patch\n\nto get the .patch file, and then apply that. Maybe his email client \nmessed up somewhere, and that's why your patch has whitespace problems.\n\n> Replacing the spaces with tabs before applying, I notice the\n> horisontal scrollbar appears to be \"outside\" of the text input area.\n> And it doesn't follow the height of the commit message text input\n> area.\n> Here's a screenshot: https://i.imgur.com/721axUX.png\n \nHmm, it looks fine for me. Which platform are you using? I am running it \non Linux. Screenshot: https://imgur.com/sNp5Ktq\n\n-- \nRegards,\nPratyush Yadav\n"},{"id":"381671","messageId":"CAGr--=JgqjC8FskqVFJTqAnQ5aq8J4z-Wje8s22VwBgVtkBF-Q@mail.gmail.com","threadId":"51786","inReplyTo":"20190902181213.7jqvoyctdm26g34z@yadavpratyush.com","subject":"Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears","fromName":"Birger Skogeng Pedersen","fromEmail":"birger.sp@gmail.com","sentAt":"2019-09-02T18:22:43Z","receivedAt":"2019-09-02T18:22:57Z","isPatch":false,"sender":{"key":"birger.sp@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5260237?v=4"},"body":"On Mon, Sep 2, 2019 at 8:05 PM Bert Wesarg <bert.wesarg@googlemail.com> wrote:\n> I cannot test windows easily, it looks good on Linux Tcl /Tk 8.6:\n>\n> https://kgab.selfhost.eu/s/f38GX4caCZBj4mZ\n\nOn Mon, Sep 2, 2019 at 8:12 PM Pratyush Yadav <me@yadavpratyush.com> wrote:\n> Hmm, it looks fine for me. Which platform are you using? I am running it\n> on Linux. Screenshot: https://imgur.com/sNp5Ktq\n\nTry resizing the bottom right pane of git gui, you should see that the\nscrollbar remains at the bottom while the input area moves upwards.\nIf not, then it must be a windows-only problem.\nFrom Bert's screenshot you can see that there is a (small) spacer\nbetween the scrollbar and the input area.\n\nPlease have a look at this: https://i.imgur.com/unAflET.png\n\n\nBr,\nBirger\n"},{"id":"381674","messageId":"20190902184405.bfb5572iia2v2uwi@yadavpratyush.com","threadId":"51786","inReplyTo":"CAGr--=JgqjC8FskqVFJTqAnQ5aq8J4z-Wje8s22VwBgVtkBF-Q@mail.gmail.com","subject":"Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears","fromName":"Pratyush Yadav","fromEmail":"me@yadavpratyush.com","sentAt":"2019-09-02T18:44:05Z","receivedAt":"2019-09-02T18:44:11Z","isPatch":false,"sender":{"key":"me@yadavpratyush.com","avatar":"https://avatars.githubusercontent.com/u/8817931?v=4"},"body":"On 02/09/19 08:22PM, Birger Skogeng Pedersen wrote:\n> On Mon, Sep 2, 2019 at 8:05 PM Bert Wesarg <bert.wesarg@googlemail.com> wrote:\n> > I cannot test windows easily, it looks good on Linux Tcl /Tk 8.6:\n> >\n> > https://kgab.selfhost.eu/s/f38GX4caCZBj4mZ\n> \n> On Mon, Sep 2, 2019 at 8:12 PM Pratyush Yadav <me@yadavpratyush.com> wrote:\n> > Hmm, it looks fine for me. Which platform are you using? I am running it\n> > on Linux. Screenshot: https://imgur.com/sNp5Ktq\n> \n> Try resizing the bottom right pane of git gui, you should see that the\n> scrollbar remains at the bottom while the input area moves upwards.\n\nYes, I can reproduce the problem when I do this. Interestingly, the \nvertical scrollbar does move, the horizontal one (which Bert just added) \ndoesn't. So I think there is a slight difference in how the horizontal \nscrollbar is set up that is causing this.\n\n> If not, then it must be a windows-only problem.\n> From Bert's screenshot you can see that there is a (small) spacer\n> between the scrollbar and the input area.\n> \n> Please have a look at this: https://i.imgur.com/unAflET.png\n> \n> \n> Br,\n> Birger\n\n-- \nRegards,\nPratyush Yadav\n"},{"id":"381675","messageId":"CAGr--=JUGkYVLbEBd7tesa4K7R3pa3QLWQGAN5-vpjaKUBkr+w@mail.gmail.com","threadId":"51786","inReplyTo":"CAKPyHN3FYR0FbDxnE4ru7OoK4w3OEE0g8tpoOqH-e+e1iTmcuA@mail.gmail.com","subject":"Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears","fromName":"Birger Skogeng Pedersen","fromEmail":"birger.sp@gmail.com","sentAt":"2019-09-02T18:51:23Z","receivedAt":"2019-09-02T18:51:38Z","isPatch":false,"sender":{"key":"birger.sp@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5260237?v=4"},"body":"On Mon, Sep 2, 2019 at 7:58 PM Bert Wesarg <bert.wesarg@googlemail.com> wrote:\n> up to now, git-gui does not hide any scrollbars, if they are not\n> needed. IMHO, I would keep it that way, as I don't like the flicker\n> when it appears and disappears. Imagine you are typing in the bottom\n> line and than you typed too much. The scrollbar appears, your input\n> line jumps one up line (or is hidden behind the scrollbar), than you\n> remove the too long line, the scrollbar disappears again and your\n> input line jumps down again.\n>\n> Bert\nFWIW I strongly agree with this. Invisible scrollbars that pop up\n(like you describe) are often quite annoying. I much prefer to just\nkeep them visible all the time, and disabled when there is nothing to\nscroll.\n\nBirger\n"},{"id":"381677","messageId":"20190902185819.fzf3lop6riiq6zja@yadavpratyush.com","threadId":"51786","inReplyTo":"20190902184405.bfb5572iia2v2uwi@yadavpratyush.com","subject":"Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears","fromName":"Pratyush Yadav","fromEmail":"me@yadavpratyush.com","sentAt":"2019-09-02T18:58:19Z","receivedAt":"2019-09-02T18:58:23Z","isPatch":false,"sender":{"key":"me@yadavpratyush.com","avatar":"https://avatars.githubusercontent.com/u/8817931?v=4"},"body":"On 03/09/19 12:14AM, Pratyush Yadav wrote:\n> On 02/09/19 08:22PM, Birger Skogeng Pedersen wrote:\n> > On Mon, Sep 2, 2019 at 8:05 PM Bert Wesarg <bert.wesarg@googlemail.com> wrote:\n> > > I cannot test windows easily, it looks good on Linux Tcl /Tk 8.6:\n> > >\n> > > https://kgab.selfhost.eu/s/f38GX4caCZBj4mZ\n> > \n> > On Mon, Sep 2, 2019 at 8:12 PM Pratyush Yadav <me@yadavpratyush.com> wrote:\n> > > Hmm, it looks fine for me. Which platform are you using? I am running it\n> > > on Linux. Screenshot: https://imgur.com/sNp5Ktq\n> > \n> > Try resizing the bottom right pane of git gui, you should see that the\n> > scrollbar remains at the bottom while the input area moves upwards.\n> \n> Yes, I can reproduce the problem when I do this. Interestingly, the \n> vertical scrollbar does move, the horizontal one (which Bert just added) \n> doesn't. So I think there is a slight difference in how the horizontal \n> scrollbar is set up that is causing this.\n \nOn second thought, wouldn't it make more sense to expand the commit \nmessage buffer instead? The point of resizing that pane is to see more \nof the commit message. So it makes more sense to make the commit message \nbuffer take up all the vertical space, rather than making the scrollbar \nmove.\n\n-- \nRegards,\nPratyush Yadav\n"},{"id":"381678","messageId":"CAKPyHN1GgXLy0+z=JbuyuSvVXsh6u5Po18OXizPNmfLE5AC00g@mail.gmail.com","threadId":"51786","inReplyTo":"20190902185819.fzf3lop6riiq6zja@yadavpratyush.com","subject":"Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears","fromName":"Bert Wesarg","fromEmail":"bert.wesarg@googlemail.com","sentAt":"2019-09-02T19:03:40Z","receivedAt":"2019-09-02T19:03:56Z","isPatch":false,"sender":{"key":"bert.wesarg@googlemail.com","avatar":"https://avatars.githubusercontent.com/u/111934?v=4"},"body":"On Mon, Sep 2, 2019 at 8:58 PM Pratyush Yadav <me@yadavpratyush.com> wrote:\n>\n> On 03/09/19 12:14AM, Pratyush Yadav wrote:\n> > On 02/09/19 08:22PM, Birger Skogeng Pedersen wrote:\n> > > On Mon, Sep 2, 2019 at 8:05 PM Bert Wesarg <bert.wesarg@googlemail.com> wrote:\n> > > > I cannot test windows easily, it looks good on Linux Tcl /Tk 8.6:\n> > > >\n> > > > https://kgab.selfhost.eu/s/f38GX4caCZBj4mZ\n> > >\n> > > On Mon, Sep 2, 2019 at 8:12 PM Pratyush Yadav <me@yadavpratyush.com> wrote:\n> > > > Hmm, it looks fine for me. Which platform are you using? I am running it\n> > > > on Linux. Screenshot: https://imgur.com/sNp5Ktq\n> > >\n> > > Try resizing the bottom right pane of git gui, you should see that the\n> > > scrollbar remains at the bottom while the input area moves upwards.\n> >\n> > Yes, I can reproduce the problem when I do this. Interestingly, the\n> > vertical scrollbar does move, the horizontal one (which Bert just added)\n> > doesn't. So I think there is a slight difference in how the horizontal\n> > scrollbar is set up that is causing this.\n>\n> On second thought, wouldn't it make more sense to expand the commit\n> message buffer instead? The point of resizing that pane is to see more\n> of the commit message. So it makes more sense to make the commit message\n> buffer take up all the vertical space, rather than making the scrollbar\n> move.\n\nit is, I just broke that ;-)\n\nBert\n\n>\n> --\n> Regards,\n> Pratyush Yadav\n"},{"id":"381680","messageId":"CAKPyHN3=QY4+XNhQPq09_PALFwfR5bWBs7q6m6LkfFoW-xeCug@mail.gmail.com","threadId":"51786","inReplyTo":"CAKPyHN1GgXLy0+z=JbuyuSvVXsh6u5Po18OXizPNmfLE5AC00g@mail.gmail.com","subject":"Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears","fromName":"Bert Wesarg","fromEmail":"bert.wesarg@googlemail.com","sentAt":"2019-09-02T19:13:27Z","receivedAt":"2019-09-02T19:13:41Z","isPatch":false,"sender":{"key":"bert.wesarg@googlemail.com","avatar":"https://avatars.githubusercontent.com/u/111934?v=4"},"body":"On Mon, Sep 2, 2019 at 9:03 PM Bert Wesarg <bert.wesarg@googlemail.com> wrote:\n>\n> On Mon, Sep 2, 2019 at 8:58 PM Pratyush Yadav <me@yadavpratyush.com> wrote:\n> >\n> > On 03/09/19 12:14AM, Pratyush Yadav wrote:\n> > > On 02/09/19 08:22PM, Birger Skogeng Pedersen wrote:\n> > > > On Mon, Sep 2, 2019 at 8:05 PM Bert Wesarg <bert.wesarg@googlemail.com> wrote:\n> > > > > I cannot test windows easily, it looks good on Linux Tcl /Tk 8.6:\n> > > > >\n> > > > > https://kgab.selfhost.eu/s/f38GX4caCZBj4mZ\n> > > >\n> > > > On Mon, Sep 2, 2019 at 8:12 PM Pratyush Yadav <me@yadavpratyush.com> wrote:\n> > > > > Hmm, it looks fine for me. Which platform are you using? I am running it\n> > > > > on Linux. Screenshot: https://imgur.com/sNp5Ktq\n> > > >\n> > > > Try resizing the bottom right pane of git gui, you should see that the\n> > > > scrollbar remains at the bottom while the input area moves upwards.\n> > >\n> > > Yes, I can reproduce the problem when I do this. Interestingly, the\n> > > vertical scrollbar does move, the horizontal one (which Bert just added)\n> > > doesn't. So I think there is a slight difference in how the horizontal\n> > > scrollbar is set up that is causing this.\n> >\n> > On second thought, wouldn't it make more sense to expand the commit\n> > message buffer instead? The point of resizing that pane is to see more\n> > of the commit message. So it makes more sense to make the commit message\n> > buffer take up all the vertical space, rather than making the scrollbar\n> > move.\n>\n> it is, I just broke that ;-)\n\nis fixed in GitHub:\n\n    wget https://github.com/bertwesarg/git-gui/commit/56163547604f44688e208393f8941efaf5247d40.patch\n\nThanks.\n\nBert\n\n>\n> Bert\n>\n> >\n> > --\n> > Regards,\n> > Pratyush Yadav\n"},{"id":"381682","messageId":"CAGr--=JL2+yMqO5Mr19Es+787qJ=eQpzEo77Pco7GOhjvuAa+w@mail.gmail.com","threadId":"51786","inReplyTo":"CAKPyHN3=QY4+XNhQPq09_PALFwfR5bWBs7q6m6LkfFoW-xeCug@mail.gmail.com","subject":"Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears","fromName":"Birger Skogeng Pedersen","fromEmail":"birger.sp@gmail.com","sentAt":"2019-09-02T19:28:04Z","receivedAt":"2019-09-02T19:28:18Z","isPatch":false,"sender":{"key":"birger.sp@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5260237?v=4"},"body":"Bert,\n\nWorks great now. Thanks a lot for fixing this!\n\nBirger\n"},{"id":"381733","messageId":"20190903171511.cd6vwn4kz7bdpose@yadavpratyush.com","threadId":"51786","inReplyTo":"CAKPyHN3=QY4+XNhQPq09_PALFwfR5bWBs7q6m6LkfFoW-xeCug@mail.gmail.com","subject":"Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears","fromName":"Pratyush Yadav","fromEmail":"me@yadavpratyush.com","sentAt":"2019-09-03T17:15:11Z","receivedAt":"2019-09-03T17:15:16Z","isPatch":false,"sender":{"key":"me@yadavpratyush.com","avatar":"https://avatars.githubusercontent.com/u/8817931?v=4"},"body":"On 02/09/19 09:13PM, Bert Wesarg wrote:\n> On Mon, Sep 2, 2019 at 9:03 PM Bert Wesarg <bert.wesarg@googlemail.com> wrote:\n> >\n[snip]\n> > > On second thought, wouldn't it make more sense to expand the \n> > > commit\n> > > message buffer instead? The point of resizing that pane is to see more\n> > > of the commit message. So it makes more sense to make the commit message\n> > > buffer take up all the vertical space, rather than making the scrollbar\n> > > move.\n> >\n> > it is, I just broke that ;-)\n> \n> is fixed in GitHub:\n> \n>     wget https://github.com/bertwesarg/git-gui/commit/56163547604f44688e208393f8941efaf5247d40.patch\n\nI tried the patch out. Works fine on Linux. Thanks.\n\nThere is a minor typo in your commit message.\n\n> Sugestted-by: Birger Skogeng Pedersen <birger.sp@gmail.com>\n\ns/Sugestted/Suggested/\n\n> Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>\n\nOne more observation:\n\nIf I write a particularly long line (and consequently the scrollbar \nbecomes active), and then hit Ctrl+A to select all text, and then \nbackspace to delete it all, the scrollbar does not get updated. It still \nshows the old position where is is \"scrolled\" halfway through. As soon \nas I type in any other character, it takes the correct state, and \nbecomes disabled.\n\nThe vertical scrollbar behaves correctly in this scenario, and does take \nthe correct state and position as soon as I delete all text, so I \nsuspect it should be a small fix. Maybe a missed option or something \nlike that?\n\n-- \nRegards,\nPratyush Yadav\n"},{"id":"381792","messageId":"CAGr--=+UA04F8JtpN3b8SahYtVkYgR45j_xeb3759DrtQOY6rg@mail.gmail.com","threadId":"51786","inReplyTo":"20190902185819.fzf3lop6riiq6zja@yadavpratyush.com","subject":"Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears","fromName":"Birger Skogeng Pedersen","fromEmail":"birger.sp@gmail.com","sentAt":"2019-09-04T05:42:28Z","receivedAt":"2019-09-04T05:44:56Z","isPatch":false,"sender":{"key":"birger.sp@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5260237?v=4"},"body":"Hi Pratyush,\n\n\nJust wanted to chime in on this one:\n\nOn Mon, Sep 2, 2019 at 8:58 PM Pratyush Yadav <me@yadavpratyush.com> wrote:\n> On second thought, wouldn't it make more sense to expand the commit\n> message buffer instead? The point of resizing that pane is to see more\n> of the commit message. So it makes more sense to make the commit message\n> buffer take up all the vertical space, rather than making the scrollbar\n> move.\n\nI also think it makes sense to expand the commit message buffer. And\nhow about automatic word wrapping? Should the user really have to care\nabout the 72 character limit, while typing the commit message? I'm not\nsure what solution would be best.\n\n\nBirger\n"},{"id":"381801","messageId":"20190904140437.xcosp24kpo5fiufa@yadavpratyush.com","threadId":"51786","inReplyTo":"CAGr--=+UA04F8JtpN3b8SahYtVkYgR45j_xeb3759DrtQOY6rg@mail.gmail.com","subject":"Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears","fromName":"Pratyush Yadav","fromEmail":"me@yadavpratyush.com","sentAt":"2019-09-04T14:04:37Z","receivedAt":"2019-09-04T14:04:42Z","isPatch":false,"sender":{"key":"me@yadavpratyush.com","avatar":"https://avatars.githubusercontent.com/u/8817931?v=4"},"body":"On 04/09/19 07:42AM, Birger Skogeng Pedersen wrote:\n> Hi Pratyush,\n> \n> \n> Just wanted to chime in on this one:\n> \n> On Mon, Sep 2, 2019 at 8:58 PM Pratyush Yadav <me@yadavpratyush.com> wrote:\n> > On second thought, wouldn't it make more sense to expand the commit\n> > message buffer instead? The point of resizing that pane is to see more\n> > of the commit message. So it makes more sense to make the commit message\n> > buffer take up all the vertical space, rather than making the scrollbar\n> > move.\n> \n> I also think it makes sense to expand the commit message buffer. And\n\nYes, it was actually a bug. Bert fixed it in his re-roll.\n\n> how about automatic word wrapping? Should the user really have to care\n> about the 72 character limit, while typing the commit message? I'm not\n> sure what solution would be best.\n\nYes, that would be a neat feature. Tcl/Tk's text boxes have a \"word \nwrap\" feature [0], but I'm not sure if that's a soft-wrap or a \nhard-wrap. We can try experimenting with those to see how well it works.  \nIt would also be a good idea to have an option to disable the word wrap.  \nMaybe do that by setting the \"Commit message text width\" to 0.\n\n[0] https://www.tcl.tk/man/tcl8.4/TkCmd/text.htm#M16\n\n-- \nRegards,\nPratyush Yadav\n"},{"id":"381815","messageId":"CAKPyHN39AXJBtuDepb-TgGSGrvqs4a5+yp74L5im3Svmw5S8aA@mail.gmail.com","threadId":"51786","inReplyTo":"20190903171511.cd6vwn4kz7bdpose@yadavpratyush.com","subject":"Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears","fromName":"Bert Wesarg","fromEmail":"bert.wesarg@googlemail.com","sentAt":"2019-09-04T19:39:02Z","receivedAt":"2019-09-04T19:39:18Z","isPatch":false,"sender":{"key":"bert.wesarg@googlemail.com","avatar":"https://avatars.githubusercontent.com/u/111934?v=4"},"body":"On Tue, Sep 3, 2019 at 7:15 PM Pratyush Yadav <me@yadavpratyush.com> wrote:\n>\n> On 02/09/19 09:13PM, Bert Wesarg wrote:\n> > On Mon, Sep 2, 2019 at 9:03 PM Bert Wesarg <bert.wesarg@googlemail.com> wrote:\n> > >\n> [snip]\n> > > > On second thought, wouldn't it make more sense to expand the\n> > > > commit\n> > > > message buffer instead? The point of resizing that pane is to see more\n> > > > of the commit message. So it makes more sense to make the commit message\n> > > > buffer take up all the vertical space, rather than making the scrollbar\n> > > > move.\n> > >\n> > > it is, I just broke that ;-)\n> >\n> > is fixed in GitHub:\n> >\n> >     wget https://github.com/bertwesarg/git-gui/commit/56163547604f44688e208393f8941efaf5247d40.patch\n>\n> I tried the patch out. Works fine on Linux. Thanks.\n>\n> There is a minor typo in your commit message.\n>\n> > Sugestted-by: Birger Skogeng Pedersen <birger.sp@gmail.com>\n>\n> s/Sugestted/Suggested/\n>\n> > Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>\n>\n> One more observation:\n>\n> If I write a particularly long line (and consequently the scrollbar\n> becomes active), and then hit Ctrl+A to select all text, and then\n> backspace to delete it all, the scrollbar does not get updated. It still\n> shows the old position where is is \"scrolled\" halfway through. As soon\n> as I type in any other character, it takes the correct state, and\n> becomes disabled.\n>\n> The vertical scrollbar behaves correctly in this scenario, and does take\n> the correct state and position as soon as I delete all text, so I\n> suspect it should be a small fix. Maybe a missed option or something\n> like that?\n\nWhile I can reproduce this, I don't figured out what is wrong here. I\ntried a minimal example and this also fails. The yScrollCommand is\nissued, but the xScrollCommand not. I have tcl/tk 8.6.8 on Linux.\n\nBert\n\n>\n> --\n> Regards,\n> Pratyush Yadav\n"},{"id":"381846","messageId":"20190904223508.lmima7iv4pbbhg3z@yadavpratyush.com","threadId":"51786","inReplyTo":"CAKPyHN39AXJBtuDepb-TgGSGrvqs4a5+yp74L5im3Svmw5S8aA@mail.gmail.com","subject":"Re: git-gui: Long lines in commit message gets hidden, no scrollbar appears","fromName":"Pratyush Yadav","fromEmail":"me@yadavpratyush.com","sentAt":"2019-09-04T22:35:09Z","receivedAt":"2019-09-04T22:35:16Z","isPatch":false,"sender":{"key":"me@yadavpratyush.com","avatar":"https://avatars.githubusercontent.com/u/8817931?v=4"},"body":"On 04/09/19 09:39PM, Bert Wesarg wrote:\n> On Tue, Sep 3, 2019 at 7:15 PM Pratyush Yadav <me@yadavpratyush.com> wrote:\n> >\n> > On 02/09/19 09:13PM, Bert Wesarg wrote:\n[snip]\n> >\n> > One more observation:\n> >\n> > If I write a particularly long line (and consequently the scrollbar\n> > becomes active), and then hit Ctrl+A to select all text, and then\n> > backspace to delete it all, the scrollbar does not get updated. It still\n> > shows the old position where is is \"scrolled\" halfway through. As soon\n> > as I type in any other character, it takes the correct state, and\n> > becomes disabled.\n> >\n> > The vertical scrollbar behaves correctly in this scenario, and does take\n> > the correct state and position as soon as I delete all text, so I\n> > suspect it should be a small fix. Maybe a missed option or something\n> > like that?\n> \n> While I can reproduce this, I don't figured out what is wrong here. I\n> tried a minimal example and this also fails. The yScrollCommand is\n> issued, but the xScrollCommand not. I have tcl/tk 8.6.8 on Linux.\n\nWell, I don't think this is a big enough problem to block this patch, \nbut still something that should ideally be fixed.\n\nI have a really busy week/weekend coming up, so I won't really be able \nto devote much time to this.  I'll see if I can figure something out \nafter that.  I'll wait for some comments on your patches, and then get \naround to reading them myself when I get some more time.  Thanks.\n\n-- \nRegards,\nPratyush Yadav\n"}]}