@monaco-neovim-wasm/lib 0.1.25 → 0.1.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/monaco-neovim-wasm.es.js +13 -13
- package/package.json +1 -1
|
@@ -2278,7 +2278,7 @@ class _e {
|
|
|
2278
2278
|
}
|
|
2279
2279
|
optimisticEnterDelegatedInsertFromKey(e) {
|
|
2280
2280
|
const t = String(e ?? "");
|
|
2281
|
-
if (!t || t.length !== 1 || !(t === "i"
|
|
2281
|
+
if (!t || t.length !== 1 || !(t === "i") || this.delegateInsertToMonaco || this.exitingInsertMode || this.init.nowMs() < this.suppressDelegationUntil || this.init.getRecordingRegister() || this.init.getExecutingRegister() || this.init.isNvimBlocking()) return;
|
|
2282
2282
|
this.delegateInsertToMonaco = !0, this.init.setEditorReadOnly(!1), this.init.setPreedit(null), this.dotRepeatKeys = "", this.dotRepeatBackspaces = 0, this.delegatedInsertReplayPossible = !0, this.lastDelegatedInsertPrefix = t;
|
|
2283
2283
|
const r = this.init.ensureActiveState();
|
|
2284
2284
|
r && (r.shadowLines = this.init.editor.getModel()?.getLinesContent() ?? null, r.pendingBufEdits = [], r.pendingFullSync = !1, r.pendingCursorSync = !1), this.optimisticEnterTimer && clearTimeout(this.optimisticEnterTimer), this.optimisticEnterTimer = globalThis.setTimeout(() => {
|
|
@@ -4870,17 +4870,17 @@ class dt {
|
|
|
4870
4870
|
this.searchHighlights.scheduleRefresh();
|
|
4871
4871
|
}
|
|
4872
4872
|
applyNvimMode(e, t) {
|
|
4873
|
-
const i = typeof e == "string" ? e : "", s = t == null ? this.nvimBlocking : !!t, r = !!(i && i !== this.lastMode), o = s !== this.nvimBlocking;
|
|
4874
|
-
if (!r && !o)
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
|
|
4878
|
-
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4873
|
+
const i = typeof e == "string" ? e : "", s = t == null ? this.nvimBlocking : !!t, r = !!(i && i !== this.lastMode), o = s !== this.nvimBlocking, a = this.lastMode;
|
|
4874
|
+
if (r && (this.lastMode = i, A(i) && this.inputEventDeduper.clear(), this.setMonacoHighlightsSuppressed(!1)), this.nvimBlocking = s, this.insertDelegation.applyMode(this.lastMode), !(!r && !o)) {
|
|
4875
|
+
if (r && (this.cursor.applyCursorStyle(i), this.opts.onModeChange && this.opts.onModeChange(i), this.visualSelection.updateVisualSelection(i), T(a) && !T(i) && this.scheduleCursorRefresh()), r && x(a) && !x(i))
|
|
4876
|
+
try {
|
|
4877
|
+
const c = this.editor.getPosition() ?? this.cursor.getLastCursorPos();
|
|
4878
|
+
c && !this.compositionActive && (this.suppressCursorSync = !0, this.editor.setSelection(new b.Selection(c.lineNumber, c.column, c.lineNumber, c.column)), this.suppressCursorSync = !1);
|
|
4879
|
+
} catch {
|
|
4880
|
+
this.suppressCursorSync = !1;
|
|
4881
|
+
}
|
|
4882
|
+
this.requestSearchHighlightRefresh();
|
|
4883
|
+
}
|
|
4884
4884
|
}
|
|
4885
4885
|
setEditorReadOnly(e) {
|
|
4886
4886
|
const t = !!e;
|
|
@@ -4903,7 +4903,7 @@ class dt {
|
|
|
4903
4903
|
}, 0));
|
|
4904
4904
|
}
|
|
4905
4905
|
sendInput(e) {
|
|
4906
|
-
this.insertDelegation.isDelegating() && !this.insertDelegation.isExitingInsertMode() && (this.acceptNvimBufLinesDuringDelegatedInsertUntil = this.nowMs() + 500), this.sendNotify("nvim_input", [e]), this.lastMode.startsWith("n") && !this.insertDelegation.isDelegating() && !this.insertDelegation.isExitingInsertMode() && typeof e == "string" && e.length === 1 &&
|
|
4906
|
+
this.insertDelegation.isDelegating() && !this.insertDelegation.isExitingInsertMode() && (this.acceptNvimBufLinesDuringDelegatedInsertUntil = this.nowMs() + 500), this.sendNotify("nvim_input", [e]), this.lastMode.startsWith("n") && !this.insertDelegation.isDelegating() && !this.insertDelegation.isExitingInsertMode() && typeof e == "string" && e.length === 1 && e === "i" && (this.insertDelegation.optimisticEnterDelegatedInsertFromKey(e), this.scheduleModePull());
|
|
4907
4907
|
}
|
|
4908
4908
|
pasteText(e) {
|
|
4909
4909
|
const t = String(e ?? "");
|