aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorherbelin2003-10-10 20:29:18 +0000
committerherbelin2003-10-10 20:29:18 +0000
commit3b1bb15621ccf83710e79d088148e42edf344e23 (patch)
treedab7c4b26057aa9195d33c45ed07cdcdc10c73f6 /lib
parentec6e25000ec0be1aaf3945eabaf5db670f0d1ece (diff)
Bug undo
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@4587 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'lib')
-rw-r--r--lib/edit.ml6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/edit.ml b/lib/edit.ml
index 6ffc6c850d..a7a7520b83 100644
--- a/lib/edit.ml
+++ b/lib/edit.ml
@@ -80,9 +80,9 @@ let undo e n =
| None -> invalid_arg "Edit.undo"
| Some d ->
let (bs,_) = Hashtbl.find e.buf d in
- repeat n Bstack.pop bs;
- if Bstack.depth bs = 1 then
- errorlabstrm "Edit.undo" (str"Undo stack exhausted")
+ if Bstack.depth bs <= n then
+ errorlabstrm "Edit.undo" (str"Undo stack exhausted");
+ repeat n Bstack.pop bs
let create e (d,b,c,udepth) =
if Hashtbl.mem e.buf d then