Skip to content

Commit

Permalink
fix position of green cursor when navigating proofs in the presence o…
Browse files Browse the repository at this point in the history
…f opening braket
  • Loading branch information
Alidra committed Apr 24, 2024
1 parent bd9a2d8 commit 9413095
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion editors/vscode/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down

0 comments on commit 9413095

Please sign in to comment.