From 08445144517d2cd1ac97e737b1bda0e65db6c999 Mon Sep 17 00:00:00 2001 From: Rowan Goemans Date: Thu, 23 Nov 2017 19:53:22 +0100 Subject: -- Fixed error where endReplace was used before declaration. --- src/CodeParser/CodeParserController.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CodeParser/CodeParserController.ts b/src/CodeParser/CodeParserController.ts index 496005b..f4c07de 100644 --- a/src/CodeParser/CodeParserController.ts +++ b/src/CodeParser/CodeParserController.ts @@ -111,7 +111,7 @@ export default class CodeParserController { currentPos.character - this.triggerSequence.length, ); - const nextLineText: string = window.activeTextEditor.document.lineAt(endReplace.line + 1).text; + const nextLineText: string = window.activeTextEditor.document.lineAt(startReplace.line + 1).text; const endReplace = new Position(currentPos.line + 1, nextLineText.length); parser.Parse(activeEditor, event).GenerateDoc(new Range(startReplace, endReplace)); -- cgit v1.2.3