From 3abb399045a77d388cbff61d664b1967e8588c2c Mon Sep 17 00:00:00 2001 From: Charlie Humphreys Date: Tue, 9 Nov 2021 10:08:48 -0600 Subject: [PATCH] Update homebrewery fold helper to allow folding the last page to the end of the document #629 --- shared/naturalcrit/codeEditor/fold-code.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/shared/naturalcrit/codeEditor/fold-code.js b/shared/naturalcrit/codeEditor/fold-code.js index ea9102de6..f7e8b0901 100644 --- a/shared/naturalcrit/codeEditor/fold-code.js +++ b/shared/naturalcrit/codeEditor/fold-code.js @@ -19,7 +19,10 @@ module.exports = { nextLine = cm.getLine(end + 1); } - return null; + return { + from : CodeMirror.Pos(start.line, 0), + to : CodeMirror.Pos(end, cm.getLine(end).length) + }; } return null;