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

Update type

Andras Schmelczer 2025-08-23 12:37:25 +01:00
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C

View file

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

View file

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