git-gui: Clear undo/redo stack when loading a message file from disk.
commitb2c6fcf197fd09a6fedb39e4d8d13e6fdc2df4d4
authorShawn O. Pearce <spearce@spearce.org>
Sat, 11 Nov 2006 21:16:25 +0000 (11 16:16 -0500)
committerShawn O. Pearce <spearce@spearce.org>
Sun, 12 Nov 2006 05:16:00 +0000 (12 00:16 -0500)
tree64e69ab95f2607f6440fa6c3566c9e41acfa6246
parent9861671de26bf7cd41f591bd2099ac299349f284
git-gui: Clear undo/redo stack when loading a message file from disk.

If we load a message file (e.g. MERGE_MSG) or we have just finished
making a commit and are clearing out the commit buffer we should also
clear out the undo/redo stack associated with that buffer.  The prior
undo/redo stack has no associated with the new content and therefore
is not useful to the user.

Also modified the sign-off operation to perform the entire update in
a single undo/redo operation, allowing the user to undo the signoff
in case they didn't actually want to do that.

I also noticed what may be a crash on Windows related to the up and
down arrow keys navigating within the diff viewer.  Since I got back
no stack trace (just an application exit with a loss of the commit
message) I suspect that the binding to scroll the text widget crashed
with an error and the wish process just terminated.  So now we catch
(and ignore) any sort of error related to the arrow keys in the diff
viewer.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui