Merge pull request #464 from devchat-ai/refactor/selection-range-adjustment-#291

Fix Docstring Function Selection Range to Include Last Line
This commit is contained in:
boob.yang 2024-03-12 16:52:07 +08:00 committed by GitHub
commit 78aa781dc9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -470,7 +470,7 @@ export function registerCodeLensRangeCommand(context: vscode.ExtensionContext) {
if (editor) {
const range = new vscode.Range(
new vscode.Position(pos.start, 0),
new vscode.Position(pos.end, 0)
new vscode.Position(pos.end+1, 0)
);
editor.selection = new vscode.Selection(range.start, range.end);
}