Fix main & improve cursor sync #101

Merged
schmelczer merged 16 commits from asch/fix-main into main 2025-08-25 17:15:52 +01:00
2 changed files with 4 additions and 3 deletions
Showing only changes of commit e81d521c9c - Show all commits

View file

@ -2,7 +2,7 @@
import type { CursorSpan } from "./CursorSpan";
export interface DocumentWithCursors {
vault_update_id: number;
vault_update_id: number | null;
document_id: string;
relative_path: string;
cursors: CursorSpan[];

View file

@ -23,8 +23,9 @@ pub struct CursorPositionFromClient {
#[derive(TS, Serialize, Deserialize, Clone, Debug)]
pub struct DocumentWithCursors {
#[ts(as = "u32")]
pub vault_update_id: VaultUpdateId,
// It's None in case the document is dirty
#[ts(as = "Option<u32>")]
pub vault_update_id: Option<VaultUpdateId>,
pub document_id: DocumentId,
pub relative_path: String,