Skip to content

Commit

Permalink
git-gui: Fix the blame viewer destroy handler.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexander Gavrilov authored and Shawn O. Pearce committed Oct 10, 2008
1 parent f10d5b0 commit 5c91cb5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/blame.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -377,11 +377,18 @@ constructor new {i_commit i_path i_jump} {
"if {{$w.file_pane} eq {%W}} {[cb _resize %h]}"

wm protocol $top WM_DELETE_WINDOW "destroy $top"
bind $top <Destroy> [cb _kill]
bind $top <Destroy> [cb _handle_destroy %W]

_load $this $i_jump
}

method _handle_destroy {win} {
if {$win eq $w} {
_kill $this
delete_this
}
}

method _kill {} {
if {$current_fd ne {}} {
kill_file_process $current_fd
Expand Down

0 comments on commit 5c91cb5

Please sign in to comment.