Skip to content
Browse files

add undocumented 'gopage x' command (useful for debugging)

  • Loading branch information...
1 parent d2b277c commit 473e8e1296bf3d35253f0e61561734e8b9c64ff7 @nusco nusco committed Nov 25, 2012
Showing with 7 additions and 2 deletions.
  1. +7 −2 resources/public/javascript/tryclojure.js
View
9 resources/public/javascript/tryclojure.js
@@ -54,7 +54,7 @@ var pageExitConditions = [
function goToPage(pageNumber) {
if (pageNumber == currentPage || pageNumber < 0 || pageNumber >= pages.length) {
- return;
+ return;
}
currentPage = pageNumber;
@@ -102,6 +102,11 @@ function html_escape(val) {
}
function doCommand(input) {
+ if (input.match(/^gopage /)) {
+ goToPage(parseInt(input.substring("gopage ".length)));
+ return true;
+ }
+
switch (input) {
case 'next':
case 'forward':
@@ -146,7 +151,7 @@ function onHandle(line, report) {
// handle page
if (currentPage >= 0 && pageExitConditions[currentPage].verify(data)) {
- nextPage();
+ goToPage(currentPage + 1);
}
// display expr results

0 comments on commit 473e8e1

Please sign in to comment.
Something went wrong with that request. Please try again.