diff options
author | Kristóf Marussy <kristof@marussy.com> | 2021-10-25 11:37:04 +0200 |
---|---|---|
committer | Kristóf Marussy <kristof@marussy.com> | 2021-10-31 19:26:11 +0100 |
commit | 8f97866dfb5303eca7e7344db8e377a60a481d1f (patch) | |
tree | 9e655f090c36cc2dc456bd2c6a0b6f9c44894076 /language-web/src/main/js/editor/XtextClient.ts | |
parent | feat(web): add xtext websocket client (diff) | |
download | refinery-8f97866dfb5303eca7e7344db8e377a60a481d1f.tar.gz refinery-8f97866dfb5303eca7e7344db8e377a60a481d1f.tar.zst refinery-8f97866dfb5303eca7e7344db8e377a60a481d1f.zip |
feat(web): application-level pings
Diffstat (limited to 'language-web/src/main/js/editor/XtextClient.ts')
-rw-r--r-- | language-web/src/main/js/editor/XtextClient.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/language-web/src/main/js/editor/XtextClient.ts b/language-web/src/main/js/editor/XtextClient.ts index eeb67d72..27ef4165 100644 --- a/language-web/src/main/js/editor/XtextClient.ts +++ b/language-web/src/main/js/editor/XtextClient.ts | |||
@@ -2,7 +2,6 @@ import { Diagnostic, setDiagnostics } from '@codemirror/lint'; | |||
2 | import { | 2 | import { |
3 | ChangeDesc, | 3 | ChangeDesc, |
4 | ChangeSet, | 4 | ChangeSet, |
5 | EditorState, | ||
6 | Transaction, | 5 | Transaction, |
7 | } from '@codemirror/state'; | 6 | } from '@codemirror/state'; |
8 | import { nanoid } from 'nanoid'; | 7 | import { nanoid } from 'nanoid'; |
@@ -63,6 +62,7 @@ export class XtextClient { | |||
63 | onTransaction(transaction: Transaction): void { | 62 | onTransaction(transaction: Transaction): void { |
64 | const { changes } = transaction; | 63 | const { changes } = transaction; |
65 | if (!changes.empty) { | 64 | if (!changes.empty) { |
65 | this.webSocketClient.ensureOpen(); | ||
66 | this.dirtyChanges = this.dirtyChanges.composeDesc(changes.desc); | 66 | this.dirtyChanges = this.dirtyChanges.composeDesc(changes.desc); |
67 | this.scheduleUpdate(); | 67 | this.scheduleUpdate(); |
68 | } | 68 | } |