From 9687c05a5c8d6aeb15e7386129cdb16c0255b56e Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Sun, 16 Jul 2023 21:08:13 -0700 Subject: quick fix for quick fix --- extension/src/lang-server/codeActions.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'extension/src/lang-server') diff --git a/extension/src/lang-server/codeActions.ts b/extension/src/lang-server/codeActions.ts index 07cf5f4e..f0d61ace 100644 --- a/extension/src/lang-server/codeActions.ts +++ b/extension/src/lang-server/codeActions.ts @@ -23,8 +23,10 @@ class ContinueQuickFixProvider implements vscode.CodeActionProvider { ); quickFix.isPreferred = false; const surroundingRange = new vscode.Range( - range.start.translate(-3, 0), - range.end.translate(3, 0) + Math.max(0, range.start.line - 3), + 0, + Math.min(document.lineCount, range.end.line + 3), + 0 ); quickFix.command = { command: "continue.quickFix", -- cgit v1.2.3-70-g09d2