From 3b1bb15621ccf83710e79d088148e42edf344e23 Mon Sep 17 00:00:00 2001 From: herbelin Date: Fri, 10 Oct 2003 20:29:18 +0000 Subject: Bug undo git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@4587 85f007b7-540e-0410-9357-904b9bb8a0f7 --- lib/edit.ml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') 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 -- cgit v1.2.3