Re: What's in git.git
- From
Junio C Hamano <junkio@cox.net>
- Date
- Aug 3, 2006, 08:39 UTC
- Message-ID
- <7vvepaqkki.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <20060803073636.GA12755@prophet.net-ronin.org>
carbonated beverage <ramune@net-ronin.org> writes:
Show 15 quoted lines
> Wheee...
>
> Found it.
>
> diff --git a/gitk b/gitk
> index ba4644f..5ae28ef 100755
> --- a/gitk
> +++ b/gitk
> @@ -770,6 +770,9 @@ proc savestuff {w} {
> set wid [expr {([winfo width $ctext] - 8) \
> / [font measure $textfont "0"]}]
> puts $f "set geometry(ctextw) $wid"
> + set geometry(ctexth) [expr {($texth - 8) /
> + / [font metrics $textfont -linespace]}]
> + puts $f "set geometry(ctexth) $wid"Are you sure about this?
* $texth is not global, and set geometry(ctexth)
expression has a syntax error (the slash at the end of
the line should be backslash for continuation) -- I do
not see how this could have worked. * you are setting geometry(ctexth) but trying to write
out $wid (which is geometry(ctextw) for the next
round). * but because of the first problem, I suspect the entire
catch {} clause would have silently failed, perhaps
leaving the old ~/.gitk around, or more likely not
creating ~/.gitk at all, which essentially is
"removing ~/.gitk every time you run it" ;-).Did your ~/.gitk change after exiting your gitk session? I somehow doubt it.
The following _might_ have a better chance of success...
---
diff --git a/gitk b/gitk index ba4644f..b06e022 100755 --- a/gitk +++ b/gitk @@ -761,17 +761,25 @@ proc savestuff {w} { puts $f [list set cmitmode $cmitmode] puts $f [list set wrapcomment $wrapcomment] puts $f [list set showneartags $showneartags] + + set g_height [winfo height .ctop] + set g_canvh [expr {[winfo height $canv]-2}] + puts $f "set geometry(width) [winfo width .ctop]" - puts $f "set geometry(height) [winfo height .ctop]" + puts $f "set geometry(height) $g_height" puts $f "set geometry(canv1) [expr {[winfo width $canv]-2}]" puts $f "set geometry(canv2) [expr {[winfo width $canv2]-2}]" puts $f "set geometry(canv3) [expr {[winfo width $canv3]-2}]" - puts $f "set geometry(canvh) [expr {[winfo height $canv]-2}]" + puts $f "set geometry(canvh) $g_canvh" set wid [expr {([winfo width $ctext] - 8) \ / [font measure $textfont "0"]}] puts $f "set geometry(ctextw) $wid" set wid [expr {([winfo width $cflist] - 11) \ / [font measure [$cflist cget -font] "0"]}] + set texth [expr {$g_height - $g_canvh - 56}] + set g_ctexth [expr {($texth - 8) \ + / [font metrics $textfont -linespace]}] + puts $f "set geometry(ctexth) $g_ctexth" puts $f "set geometry(cflistw) $wid" puts -nonewline $f "set permviews {" for {set v 0} {$v < $nextviewnum} {incr v} {