summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Shawn O. Pearce <spearce@spearce.org>2007-06-02 00:09:55 -0400
committerLibravatar Shawn O. Pearce <spearce@spearce.org>2007-06-06 01:26:48 -0400
commitb55a243dfc51865445e4b13e84dc6d4cb917bcdf (patch)
tree132ac80bf711e2825e5d560d15b504330b326500
parentgit-gui: Use a label instead of a button for the back button (diff)
downloadtgif-b55a243dfc51865445e4b13e84dc6d4cb917bcdf.tar.xz
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>
-rw-r--r--lib/blame.tcl3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/blame.tcl b/lib/blame.tcl
index 2f7503ad6b..85e9e0dc32 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]