mirror of
https://github.com/hexedtech/codemp-vscode.git
synced 2024-11-25 00:44:48 +01:00
chore: still compliance to api changes
Some checks failed
test / build-test (push) Has been cancelled
Some checks failed
test / build-test (push) Has been cancelled
This commit is contained in:
parent
0e7e004cba
commit
5b9ab79350
1 changed files with 7 additions and 7 deletions
|
@ -68,11 +68,11 @@ export class UserDecoration {
|
||||||
|
|
||||||
// TODO can we avoid disposing and recreating the decoration type every time?
|
// TODO can we avoid disposing and recreating the decoration type every time?
|
||||||
public update(event: codemp.Cursor, editor?: vscode.TextEditor) {
|
public update(event: codemp.Cursor, editor?: vscode.TextEditor) {
|
||||||
this.buffer = event.buffer;
|
this.buffer = event.sel.buffer;
|
||||||
this.startRow = event.startRow;
|
this.startRow = event.sel.startRow;
|
||||||
this.startCol = event.startCol;
|
this.startCol = event.sel.startCol;
|
||||||
this.endRow = event.endRow;
|
this.endRow = event.sel.endRow;
|
||||||
this.endCol = event.endCol;
|
this.endCol = event.sel.endCol;
|
||||||
if (this.decoration == null) {
|
if (this.decoration == null) {
|
||||||
this.decoration = vscode.window.createTextEditorDecorationType({
|
this.decoration = vscode.window.createTextEditorDecorationType({
|
||||||
borderWidth: '1px',
|
borderWidth: '1px',
|
||||||
|
@ -87,8 +87,8 @@ export class UserDecoration {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const range_start: vscode.Position = new vscode.Position(event.startRow, event.startCol); // -1?
|
const range_start: vscode.Position = new vscode.Position(event.sel.startRow, event.sel.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.sel.endRow, event.sel.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) {
|
if (editor !== undefined) {
|
||||||
editor.setDecorations(
|
editor.setDecorations(
|
||||||
|
|
Loading…
Reference in a new issue