🐛 fix index decoration not showing bug

This commit is contained in:
Nate Sesti 2023-12-31 11:16:06 -05:00
parent 09ef952948
commit 3ac715b759

View file

@ -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 {