From b1539a509127e2b9eda887664c2bdb9a54faa286 Mon Sep 17 00:00:00 2001 From: herbelin Date: Sat, 11 Oct 2003 19:38:18 +0000 Subject: reparation Undo suite git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@4603 85f007b7-540e-0410-9357-904b9bb8a0f7 --- lib/edit.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/edit.ml b/lib/edit.ml index a7a7520b83..e22c17ad51 100644 --- a/lib/edit.ml +++ b/lib/edit.ml @@ -80,8 +80,8 @@ let undo e n = | None -> invalid_arg "Edit.undo" | Some d -> let (bs,_) = Hashtbl.find e.buf d in - if Bstack.depth bs <= n then - errorlabstrm "Edit.undo" (str"Undo stack exhausted"); + if Bstack.depth bs = 1 & n > 0 then + errorlabstrm "Edit.undo" (str"Undo stack exhausted"); repeat n Bstack.pop bs let create e (d,b,c,udepth) = -- cgit v1.2.3