Verified Commit 2ab41309 authored by Camil Staps's avatar Camil Staps 🚀

Minor fixes

parent f6a39cd4
......@@ -80,7 +80,7 @@ bs_let = (["let", "in", "let in"],
{ syntax_title = "let expression"
, syntax_code = ["let ... in ..."]
, syntax_description = "An expression that introduces new scope."
, syntax_doc_location = [CLR 5 "3.5.1" "_Toc31178003"]
, syntax_doc_location = [CLR 5 "3.5.1" "_Toc311798003"]
, syntax_examples =
[ EXs "Function" "macro" "fac n = let fs = [1:1:[(fs!!(i-1)) + (fs!!(i-2)) \\ i <- [2..]]] in fs !! n"
, EXs "Function" "macrorhs" "let // Multi-line let expressions\n\tfunction args = body\n\tselector = expr\n\t// ...\nin expression"
......
......@@ -34,7 +34,7 @@ window.onload = function() {
onLoad: function(state) {
if (state.jump != null) {
var l = document.getElementsByName(state.jump)[0].documentOffsetTop();
viewer.scrollTo(0, l - window.innerHeight/8);
viewer.scrollTop = l - window.innerHeight/8;
}
},
state: {
......
......@@ -94,11 +94,12 @@ window.onload = function() {
},
viewer: viewer,
onLoad: function(state) {
viewer.scrollLeft = 0;
if (state.line != null) {
var l = document.getElementById('line-' + state.line).documentOffsetTop();
viewer.scrollTo(0, l - window.innerHeight/4);
viewer.scrollTop = l - window.innerHeight/4;
} else {
viewer.scrollTo(0, 0);
viewer.scrollTop = 0;
}
bindLinenos();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment