summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-06-02 04:09:55 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2007-06-06 05:26:48 (GMT)
commitb55a243dfc51865445e4b13e84dc6d4cb917bcdf (patch)
tree132ac80bf711e2825e5d560d15b504330b326500 /lib
parent08dda17e00e676c5cd1b4f2a8245c318d6c97f82 (diff)
downloadgit-b55a243dfc51865445e4b13e84dc6d4cb917bcdf.zip
git-b55a243dfc51865445e4b13e84dc6d4cb917bcdf.tar.gz
git-b55a243dfc51865445e4b13e84dc6d4cb917bcdf.tar.bz2
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 <spearce@spearce.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/blame.tcl3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/blame.tcl b/lib/blame.tcl
index 2f7503a..85e9e0d 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]