Skip to content

Commit

Permalink
Select the match on reveal definition
Browse files Browse the repository at this point in the history
  • Loading branch information
NickHeap2 committed Nov 1, 2020
1 parent 3f6cec2 commit 67e580a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/AntTreeDataProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,9 @@ module.exports = class AntTreeDataProvider {
// reveal the position in the center
textEditor.revealRange(new vscode.Range(position, position), vscode.TextEditorRevealType.InCenter)
// position the cursor
textEditor.selection = new vscode.Selection(position, position);
let startSelection = textEditor.document.positionAt(offset.index)
let endSelection = textEditor.document.positionAt(offset.index + offset[0].length)
textEditor.selection = new vscode.Selection(startSelection, endSelection)
}
})
}
Expand Down

0 comments on commit 67e580a

Please sign in to comment.