From acbaab80b4209b255ef4bb68ce226c16435930ce Mon Sep 17 00:00:00 2001 From: alemi Date: Wed, 25 Sep 2024 05:37:56 +0200 Subject: [PATCH] feat: show mark in overview ruler, bigger name --- src/mapping.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/mapping.ts b/src/mapping.ts index 121d02b..aad0700 100644 --- a/src/mapping.ts +++ b/src/mapping.ts @@ -67,14 +67,19 @@ export class UserDecoration { borderStyle: 'solid', borderColor: this.color, backgroundColor: this.color + '44', // add alpha - + overviewRulerColor: this.color, }); } 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 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() {