{"thread":{"id":"51845","subject":"[PATCH v4] git-gui: add horizontal scrollbar to commit buffer","startedAt":"2019-09-13T20:16:34Z","lastAt":"2019-09-13T20:39:11Z","messageCount":2,"participants":["Bert Wesarg","Pratyush Yadav"],"isPatch":true,"patchVersion":4,"patchTotal":null},"messages":[{"id":"382329","messageId":"20b0d8599099a412833af93f85e414fdc495dd76.1568405611.git.bert.wesarg@googlemail.com","threadId":"51845","inReplyTo":null,"subject":"[PATCH v4] git-gui: add horizontal scrollbar to commit buffer","fromName":"Bert Wesarg","fromEmail":"bert.wesarg@googlemail.com","sentAt":"2019-09-13T20:16:28Z","receivedAt":"2019-09-13T20:16:34Z","isPatch":true,"sender":{"key":"bert.wesarg@googlemail.com","avatar":"https://avatars.githubusercontent.com/u/111934?v=4"},"body":"While the commit message widget has a configurable fixed width, it\nnevertheless allowed to write commit messages which exceeded this limit.\nThough there is no visual clue, that there is scrolling going on. Now\nthere is a horizontal scrollbar.\n\nThere seems to be a bug in at least Tcl/Tk up to version 8.6.8, which\ndoes not update the horizontal scrollbar if one removes the whole\ncontent at once.\n\nSuggested-by: Birger Skogeng Pedersen <birger.sp@gmail.com>\nSigned-off-by: Bert Wesarg <bert.wesarg@googlemail.com>\n---\n git-gui.sh | 6 ++++++\n 1 file changed, 6 insertions(+)\n\ndiff --git a/git-gui.sh b/git-gui.sh\nindex 5bc21b8..ad962d4 100755\n--- a/git-gui.sh\n+++ b/git-gui.sh\n@@ -3363,10 +3363,16 @@ ttext $ui_comm -background white -foreground black \\\n \t-relief sunken \\\n \t-width $repo_config(gui.commitmsgwidth) -height 9 -wrap none \\\n \t-font font_diff \\\n+\t-xscrollcommand {.vpane.lower.commarea.buffer.frame.sbx set} \\\n \t-yscrollcommand {.vpane.lower.commarea.buffer.frame.sby set}\n+${NS}::scrollbar .vpane.lower.commarea.buffer.frame.sbx \\\n+\t-orient horizontal \\\n+\t-command [list $ui_comm xview]\n ${NS}::scrollbar .vpane.lower.commarea.buffer.frame.sby \\\n+\t-orient vertical \\\n \t-command [list $ui_comm yview]\n \n+pack .vpane.lower.commarea.buffer.frame.sbx -side bottom -fill x\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.header -side top -fill x\n-- \n2.21.0.789.ga095d9d866\n\n"},{"id":"382335","messageId":"20190913203904.n2sdjczlfobfs2yr@yadavpratyush.com","threadId":"51845","inReplyTo":"20b0d8599099a412833af93f85e414fdc495dd76.1568405611.git.bert.wesarg@googlemail.com","subject":"Re: [PATCH v4] git-gui: add horizontal scrollbar to commit buffer","fromName":"Pratyush Yadav","fromEmail":"me@yadavpratyush.com","sentAt":"2019-09-13T20:39:04Z","receivedAt":"2019-09-13T20:39:11Z","isPatch":true,"sender":{"key":"me@yadavpratyush.com","avatar":"https://avatars.githubusercontent.com/u/8817931?v=4"},"body":"Thanks for the re-roll. Will queue.\n\nOn 13/09/19 10:16PM, Bert Wesarg wrote:\n> While the commit message widget has a configurable fixed width, it\n> nevertheless allowed to write commit messages which exceeded this limit.\n> Though there is no visual clue, that there is scrolling going on. Now\n> there is a horizontal scrollbar.\n> \n> There seems to be a bug in at least Tcl/Tk up to version 8.6.8, which\n> does not update the horizontal scrollbar if one removes the whole\n> content at once.\n> \n> Suggested-by: Birger Skogeng Pedersen <birger.sp@gmail.com>\n> Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>\n> ---\n>  git-gui.sh | 6 ++++++\n>  1 file changed, 6 insertions(+)\n> \n> diff --git a/git-gui.sh b/git-gui.sh\n> index 5bc21b8..ad962d4 100755\n> --- a/git-gui.sh\n> +++ b/git-gui.sh\n> @@ -3363,10 +3363,16 @@ ttext $ui_comm -background white -foreground black \\\n>  \t-relief sunken \\\n>  \t-width $repo_config(gui.commitmsgwidth) -height 9 -wrap none \\\n>  \t-font font_diff \\\n> +\t-xscrollcommand {.vpane.lower.commarea.buffer.frame.sbx set} \\\n>  \t-yscrollcommand {.vpane.lower.commarea.buffer.frame.sby set}\n> +${NS}::scrollbar .vpane.lower.commarea.buffer.frame.sbx \\\n> +\t-orient horizontal \\\n> +\t-command [list $ui_comm xview]\n>  ${NS}::scrollbar .vpane.lower.commarea.buffer.frame.sby \\\n> +\t-orient vertical \\\n>  \t-command [list $ui_comm yview]\n>  \n> +pack .vpane.lower.commarea.buffer.frame.sbx -side bottom -fill x\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.header -side top -fill x\n> -- \n> 2.21.0.789.ga095d9d866\n> \n\n-- \nRegards,\nPratyush Yadav\n"}]}