Lint
This commit is contained in:
parent
fc40d3eccf
commit
491a601ad2
9 changed files with 101 additions and 77 deletions
|
|
@ -15,7 +15,8 @@ import { MarkdownView } from "obsidian";
|
|||
|
||||
import { StateEffect } from "@codemirror/state";
|
||||
import { getRandomColor } from "src/utils/get-random-color";
|
||||
import { reconcileWithHistory, SpanWithHistory } from "reconcile-text";
|
||||
import type { SpanWithHistory } from "reconcile-text";
|
||||
import { reconcileWithHistory } from "reconcile-text";
|
||||
|
||||
function findWhereToMoveCursor(
|
||||
cursor: number,
|
||||
|
|
@ -39,8 +40,6 @@ function findWhereToMoveCursor(
|
|||
const forceUpdate = StateEffect.define();
|
||||
|
||||
export class RemoteCursorsPluginValue implements PluginValue {
|
||||
public decorations: DecorationSet = RangeSet.of([]);
|
||||
|
||||
private static cursors: {
|
||||
name: string;
|
||||
path: string;
|
||||
|
|
@ -49,6 +48,8 @@ export class RemoteCursorsPluginValue implements PluginValue {
|
|||
isOutdated: boolean;
|
||||
}[] = [];
|
||||
|
||||
public decorations: DecorationSet = RangeSet.of([]);
|
||||
|
||||
public static setCursors(
|
||||
clients: MaybeOutdatedClientCursors[],
|
||||
app: App
|
||||
|
|
@ -101,7 +102,7 @@ export class RemoteCursorsPluginValue implements PluginValue {
|
|||
const original = update.startState.doc.toString();
|
||||
const edited = update.state.doc.toString();
|
||||
|
||||
let updatedPositions: number[] = [];
|
||||
const updatedPositions: number[] = [];
|
||||
const reconciled = reconcileWithHistory(
|
||||
original,
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue