From 9413095e2fad4fe5a8409c32c8aea7b37339e83e Mon Sep 17 00:00:00 2001 From: Abdelghani Alidra Date: Wed, 24 Apr 2024 15:49:20 +0200 Subject: [PATCH] fix position of green cursor when navigating proofs in the presence of opening braket --- editors/vscode/src/client.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/editors/vscode/src/client.ts b/editors/vscode/src/client.ts index 7ee27277e..ef7809def 100644 --- a/editors/vscode/src/client.ts +++ b/editors/vscode/src/client.ts @@ -509,7 +509,11 @@ function stepCommand(document: TextDocument, currentPos: Position, forward: bool const termRegex = new RegExp(terminators.join("|"), 'gi'); let termPositions = [...document.getText().matchAll(termRegex)] - .map(rm => rm.index ? rm.index + rm[0].length : undefined) + .map(rm => { + if (rm[0] === ";") { + return rm.index ? rm.index + rm[0].length : undefined + } + else return rm.index ? rm.index : undefined }) .filter((x): x is number => x !== undefined) // remove undefined .map(x => document.positionAt(x));