From 3ac715b759dd7580f69db3ad60864312401408c7 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Sun, 31 Dec 2023 11:16:06 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix=20index=20decoration=20not?= =?UTF-8?q?=20showing=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/vscode/src/diff/verticalPerLine.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/extensions/vscode/src/diff/verticalPerLine.ts b/extensions/vscode/src/diff/verticalPerLine.ts index 45a3a831f..6f350a7ca 100644 --- a/extensions/vscode/src/diff/verticalPerLine.ts +++ b/extensions/vscode/src/diff/verticalPerLine.ts @@ -6,7 +6,7 @@ import { llmFromTitle } from "../loadConfig"; const redDecorationType = vscode.window.createTextEditorDecorationType({ isWholeLine: true, backgroundColor: "rgba(255, 0, 0, 0.2)", - color: "white", + color: "rgb(200, 200, 200)", rangeBehavior: vscode.DecorationRangeBehavior.ClosedClosed, }); @@ -161,10 +161,13 @@ export class VerticalPerLineDiffHandler { private updateIndexLineDecorations() { // Highlight the line at the currentLineIndex // And lightly highlight all lines between that and endLine - if ( - this.currentLineIndex - this.newLinesAdded >= - this.endLine - this.startLine - ) { + console.log( + this.currentLineIndex, + this.newLinesAdded, + this.endLine, + this.startLine + ); + if (this.currentLineIndex - this.newLinesAdded >= this.endLine) { this.editor.setDecorations(indexDecorationType, []); this.editor.setDecorations(belowIndexDecorationType, []); } else {