Skip to content

Commit 5c91cb5

Browse files
angavrilovspearce
authored andcommitted
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 <[email protected]> Signed-off-by: Shawn O. Pearce <[email protected]>
1 parent f10d5b0 commit 5c91cb5

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lib/blame.tcl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,11 +377,18 @@ constructor new {i_commit i_path i_jump} {
377377
"if {{$w.file_pane} eq {%W}} {[cb _resize %h]}"
378378

379379
wm protocol $top WM_DELETE_WINDOW "destroy $top"
380-
bind $top <Destroy> [cb _kill]
380+
bind $top <Destroy> [cb _handle_destroy %W]
381381

382382
_load $this $i_jump
383383
}
384384

385+
method _handle_destroy {win} {
386+
if {$win eq $w} {
387+
_kill $this
388+
delete_this
389+
}
390+
}
391+
385392
method _kill {} {
386393
if {$current_fd ne {}} {
387394
kill_file_process $current_fd

0 commit comments

Comments
 (0)