From b55a243dfc51865445e4b13e84dc6d4cb917bcdf Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Sat, 2 Jun 2007 00:09:55 -0400 Subject: [PATCH] git-gui: Clip the commit summaries in the blame history menu Some commit lines can get really long when users enter a lot of text without linewrapping (for example). Rather than letting the menu get out of control in terms of width we clip the summary to the first 50+ characters. Signed-off-by: Shawn O. Pearce --- lib/blame.tcl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/blame.tcl b/lib/blame.tcl index 2f7503ad6..85e9e0dc3 100644 --- a/lib/blame.tcl +++ b/lib/blame.tcl @@ -390,6 +390,9 @@ method _history_menu {} { } if {![catch {set summary $header($c,summary)}]} { append t " $summary" + if {[string length $t] > 70} { + set t [string range $t 0 66]... + } } $m add command -label $t -command [cb _goback $i $c $f] -- 2.30.2