diff options
| author | aspiwack | 2012-07-10 10:08:06 +0000 |
|---|---|---|
| committer | aspiwack | 2012-07-10 10:08:06 +0000 |
| commit | 7cf5f94e772df8632b88088f1cf0ae2287e8f64f (patch) | |
| tree | 4ed38deecc2739810200e252d9638ab3a76985fa | |
| parent | fbf196647d0abd1dbbeda690e2065426d33e5156 (diff) | |
Fixes bug 2841 ([Focus 0] gives anomaly).
Now a proper error message is displayed.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@15574 85f007b7-540e-0410-9357-904b9bb8a0f7
| -rw-r--r-- | toplevel/vernacentries.ml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/toplevel/vernacentries.ml b/toplevel/vernacentries.ml index ebe1e4fbed..d4cacf68b7 100644 --- a/toplevel/vernacentries.ml +++ b/toplevel/vernacentries.ml @@ -1496,7 +1496,10 @@ let vernac_undoto n = let vernac_focus gln = let p = Proof_global.give_me_the_proof () in let n = match gln with None -> 1 | Some n -> n in - Proof.focus focus_command_cond () n p; print_subgoals () + if n = 0 then + Errors.error "Invalid goal number: 0. Goal numbering starts with 1." + else + Proof.focus focus_command_cond () n p; print_subgoals () (* Unfocuses one step in the focus stack. *) let vernac_unfocus () = |
