@lvce-editor/editor-worker 19.78.4 → 19.78.6
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/diff-sdk.js +4 -2
- package/dist/editorWorkerMain.js +4 -2
- package/package.json +1 -1
package/dist/diff-sdk.js
CHANGED
|
@@ -17895,10 +17895,10 @@ const compositionEnd = (editor, data) => {
|
|
|
17895
17895
|
const {
|
|
17896
17896
|
selections
|
|
17897
17897
|
} = editor;
|
|
17898
|
-
const changes = getCompositionChanges(selections, data);
|
|
17898
|
+
const changes = data === state$4.compositionText ? undefined : getCompositionChanges(selections, data);
|
|
17899
17899
|
state$4.isComposing = false;
|
|
17900
17900
|
state$4.compositionText = '';
|
|
17901
|
-
return scheduleDocumentAndCursorsSelections(editor, changes);
|
|
17901
|
+
return changes ? scheduleDocumentAndCursorsSelections(editor, changes) : editor;
|
|
17902
17902
|
};
|
|
17903
17903
|
|
|
17904
17904
|
const writeText = async text => {
|
|
@@ -26110,6 +26110,7 @@ const loadContent = async (state, savedState, largeFile = false, focus = true, f
|
|
|
26110
26110
|
syntaxHighlightingCacheEnabled,
|
|
26111
26111
|
tabSize
|
|
26112
26112
|
} = await getEditorPreferences(state.applicationId);
|
|
26113
|
+
const isMonospaceFont = fontFamily === 'Fira Code' || fontFamily === "'Fira Code'";
|
|
26113
26114
|
// TODO support overwriting language id by setting it explicitly or via settings
|
|
26114
26115
|
const charWidth = await measureCharacterWidth(fontWeight, fontSize, fontFamily, letterSpacing);
|
|
26115
26116
|
const languages = await getLanguages(platform, assetDir, state.applicationId);
|
|
@@ -26140,6 +26141,7 @@ const loadContent = async (state, savedState, largeFile = false, focus = true, f
|
|
|
26140
26141
|
isAutoClosingBracketsEnabled,
|
|
26141
26142
|
isAutoClosingQuotesEnabled,
|
|
26142
26143
|
isAutoClosingTagsEnabled,
|
|
26144
|
+
isMonospaceFont,
|
|
26143
26145
|
isQuickSuggestionsEnabled,
|
|
26144
26146
|
languageId: computedLanguageId,
|
|
26145
26147
|
letterSpacing,
|
package/dist/editorWorkerMain.js
CHANGED
|
@@ -18320,10 +18320,10 @@ const compositionEnd = (editor, data) => {
|
|
|
18320
18320
|
const {
|
|
18321
18321
|
selections
|
|
18322
18322
|
} = editor;
|
|
18323
|
-
const changes = getCompositionChanges(selections, data);
|
|
18323
|
+
const changes = data === state$4.compositionText ? undefined : getCompositionChanges(selections, data);
|
|
18324
18324
|
state$4.isComposing = false;
|
|
18325
18325
|
state$4.compositionText = '';
|
|
18326
|
-
return scheduleDocumentAndCursorsSelections(editor, changes);
|
|
18326
|
+
return changes ? scheduleDocumentAndCursorsSelections(editor, changes) : editor;
|
|
18327
18327
|
};
|
|
18328
18328
|
|
|
18329
18329
|
const writeText = async text => {
|
|
@@ -26535,6 +26535,7 @@ const loadContent = async (state, savedState, largeFile = false, focus = true, f
|
|
|
26535
26535
|
syntaxHighlightingCacheEnabled,
|
|
26536
26536
|
tabSize
|
|
26537
26537
|
} = await getEditorPreferences(state.applicationId);
|
|
26538
|
+
const isMonospaceFont = fontFamily === 'Fira Code' || fontFamily === "'Fira Code'";
|
|
26538
26539
|
// TODO support overwriting language id by setting it explicitly or via settings
|
|
26539
26540
|
const charWidth = await measureCharacterWidth(fontWeight, fontSize, fontFamily, letterSpacing);
|
|
26540
26541
|
const languages = await getLanguages(platform, assetDir, state.applicationId);
|
|
@@ -26565,6 +26566,7 @@ const loadContent = async (state, savedState, largeFile = false, focus = true, f
|
|
|
26565
26566
|
isAutoClosingBracketsEnabled,
|
|
26566
26567
|
isAutoClosingQuotesEnabled,
|
|
26567
26568
|
isAutoClosingTagsEnabled,
|
|
26569
|
+
isMonospaceFont,
|
|
26568
26570
|
isQuickSuggestionsEnabled,
|
|
26569
26571
|
languageId: computedLanguageId,
|
|
26570
26572
|
letterSpacing,
|