summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9861671)
raw | patch | inline | side by side (parent: 9861671)
author | Shawn O. Pearce <spearce@spearce.org> | |
Sat, 11 Nov 2006 21:16:25 +0000 (16:16 -0500) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Sun, 12 Nov 2006 05:16:00 +0000 (00:16 -0500) |
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>
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 | patch | blob | history |
index 640519c204c904eb3982a827f44c997165639dd2..540d56397a86c28fd78fb0fc01f31480f3f82353 100755 (executable)
--- a/git-gui
+++ b/git-gui
} elseif {[load_message SQUASH_MSG]} {
}
$ui_comm edit modified false
+ $ui_comm edit reset
}
if {$cfg_trust_mtime == {true}} {
$ui_comm delete 0.0 end
$ui_comm insert end $msg
$ui_comm edit modified false
+ $ui_comm edit reset
update_status
} else {
error_popup {You can't amend a merge commit.}
$ui_comm delete 0.0 end
$ui_comm edit modified false
+ $ui_comm edit reset
if {$single_commit} do_quit
set str "Signed-off-by: $GIT_COMMITTER_IDENT"
if {[$ui_comm get {end -1c linestart} {end -1c}] != $str} {
- $ui_comm insert end "\n"
- $ui_comm insert end $str
+ $ui_comm edit separator
+ $ui_comm insert end "\n$str"
+ $ui_comm edit separator
$ui_comm see end
}
}
}}
text $ui_comm -background white -borderwidth 1 \
-undo true \
+ -maxundo 20 \
-autoseparators true \
-relief sunken \
-width 75 -height 9 -wrap none \
bind $ui_diff <$M1B-Key-V> {break}
bind $ui_diff <$M1B-Key-a> {%W tag add sel 0.0 end;break}
bind $ui_diff <$M1B-Key-A> {%W tag add sel 0.0 end;break}
-bind $ui_diff <Key-Up> {%W yview scroll -1 units}
-bind $ui_diff <Key-Down> {%W yview scroll 1 units}
-bind $ui_diff <Key-Left> {%W xview scroll -1 units}
-bind $ui_diff <Key-Right> {%W xview scroll 1 units}
+bind $ui_diff <Key-Up> {catch {%W yview scroll -1 units};break}
+bind $ui_diff <Key-Down> {catch {%W yview scroll 1 units};break}
+bind $ui_diff <Key-Left> {catch {%W xview scroll -1 units};break}
+bind $ui_diff <Key-Right> {catch {%W xview scroll 1 units};break}
bind . <Destroy> do_quit
bind all <Key-F5> do_rescan