@matheusbsbs / matheus-bagliano / commits / 5c91cb5d0d
Fork 0

git-gui: Fix the blame viewer destroy handler.

It did not delete the object, which is not very good. Also, destroy may be fired up for subwindows, so we should check %W. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Alexander Gavrilov committed Oct 3, 2008 at 11:36 UTC 5c91cb5d0dd06aa5574234a3d651098393adb4fa
1 file changed +8 -1
lib/blame.tcl
+8 -1
@@ -377,11 +377,18 @@ constructor new {i_commit i_path i_jump} {
377 "if {{$w.file_pane} eq {%W}} {[cb _resize %h]}"
378
379 wm protocol $top WM_DELETE_WINDOW "destroy $top"
380 - bind $top <Destroy> [cb _kill]
380 + bind $top <Destroy> [cb _handle_destroy %W]
381
382 _load $this $i_jump
383 }
384
385 +method _handle_destroy {win} {
386 + if {$win eq $w} {
387 + _kill $this
388 + delete_this
389 + }
390 +}
391 +
392 method _kill {} {
393 if {$current_fd ne {}} {
394 kill_file_process $current_fd