aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects/frontend/src/language/folding.ts
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2022-07-27 16:34:14 +0200
committerLibravatar Kristóf Marussy <kristof@marussy.com>2022-07-27 16:34:14 +0200
commitdeaa0580d952b77cf9e6df024d1f71ed29f53fc0 (patch)
tree95a4e538b21c13674de99a6645bae1424714721a /subprojects/frontend/src/language/folding.ts
parentdocs: Add note about proxy settings (diff)
downloadrefinery-deaa0580d952b77cf9e6df024d1f71ed29f53fc0.tar.gz
refinery-deaa0580d952b77cf9e6df024d1f71ed29f53fc0.tar.zst
refinery-deaa0580d952b77cf9e6df024d1f71ed29f53fc0.zip
chore: bump dependencies
Diffstat (limited to 'subprojects/frontend/src/language/folding.ts')
-rw-r--r--subprojects/frontend/src/language/folding.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/subprojects/frontend/src/language/folding.ts b/subprojects/frontend/src/language/folding.ts
index 5d51f796..2560c183 100644
--- a/subprojects/frontend/src/language/folding.ts
+++ b/subprojects/frontend/src/language/folding.ts
@@ -52,7 +52,7 @@ export function foldDeclaration(node: SyntaxNode, state: EditorState): FoldRange
52 if (open === null || close === null) { 52 if (open === null || close === null) {
53 return null; 53 return null;
54 } 54 }
55 const { cursor } = open; 55 const cursor = open.cursor();
56 const lineEnd = state.doc.lineAt(open.from).to; 56 const lineEnd = state.doc.lineAt(open.from).to;
57 let foldFrom = open.to; 57 let foldFrom = open.to;
58 while (cursor.next() && cursor.from < lineEnd) { 58 while (cursor.next() && cursor.from < lineEnd) {
@@ -84,7 +84,7 @@ function foldWithSibling(node: SyntaxNode): FoldRange | null {
84 if (firstChild === null) { 84 if (firstChild === null) {
85 return null; 85 return null;
86 } 86 }
87 const { cursor } = firstChild; 87 const cursor = firstChild.cursor();
88 let nSiblings = 0; 88 let nSiblings = 0;
89 while (cursor.nextSibling()) { 89 while (cursor.nextSibling()) {
90 if (cursor.type === node.type) { 90 if (cursor.type === node.type) {