feat: show mark in overview ruler, bigger name

This commit is contained in:
əlemi 2024-09-25 05:37:56 +02:00
parent e7bb5ce91f
commit acbaab80b4
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -67,14 +67,19 @@ export class UserDecoration {
borderStyle: 'solid', borderStyle: 'solid',
borderColor: this.color, borderColor: this.color,
backgroundColor: this.color + '44', // add alpha backgroundColor: this.color + '44', // add alpha
overviewRulerColor: this.color,
}); });
} }
const range_start: vscode.Position = new vscode.Position(event.startRow, event.startCol); // -1? const range_start: vscode.Position = new vscode.Position(event.startRow, event.startCol); // -1?
const range_end: vscode.Position = new vscode.Position(event.endRow, event.endCol); // -1? idk if this works it's kinda funny, should test with someone with a working version of codemp const range_end: vscode.Position = new vscode.Position(event.endRow, event.endCol); // -1? idk if this works it's kinda funny, should test with someone with a working version of codemp
const decorationRange = new vscode.Range(range_start, range_end); const decorationRange = new vscode.Range(range_start, range_end);
if(editor !== undefined) editor.setDecorations(this.decoration, [{range: decorationRange, hoverMessage: event.user || "anon"}]); if (editor !== undefined) {
editor.setDecorations(
this.decoration,
[{ range: decorationRange, hoverMessage: new vscode.MarkdownString(`### \`${event.user}\`'s cursor`)}]
);
}
} }
public clear() { public clear() {