提交 c8e23aaf 编写于 作者: S Shawn O. Pearce

git-gui: Unlock the index when cancelling merge dialog

Pressing the escape key while in the merge dialog cancels the merge
and correctly unlocks the index.  Unfortunately this is not true of
the Cancel button, using it closes the dialog but does not release
the index lock, rendering git-gui frozen until you restart it.  We
now properly release the index lock when the Cancel button is used.
Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
上级 7aecb128
......@@ -213,7 +213,9 @@ proc dialog {} {
pack $w.buttons.visualize -side left
button $w.buttons.create -text Merge -command $_start
pack $w.buttons.create -side right
button $w.buttons.cancel -text {Cancel} -command [list destroy $w]
button $w.buttons.cancel \
-text {Cancel} \
-command "unlock_index;destroy $w"
pack $w.buttons.cancel -side right -padx 5
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册