@lvce-editor/editor-worker 5.5.0 → 5.7.0
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/editorWorkerMain.js +7 -4
- package/package.json +1 -1
package/dist/editorWorkerMain.js
CHANGED
|
@@ -1860,7 +1860,7 @@ const updateDiagnostics = async newState => {
|
|
|
1860
1860
|
const diagnostics = await executeDiagnosticProvider(newState);
|
|
1861
1861
|
const latest = get$6(newState.id);
|
|
1862
1862
|
if (!latest) {
|
|
1863
|
-
return;
|
|
1863
|
+
return newState;
|
|
1864
1864
|
}
|
|
1865
1865
|
const decorations = getVisibleDiagnostics(latest.newState, diagnostics);
|
|
1866
1866
|
const newEditor = {
|
|
@@ -1870,6 +1870,7 @@ const updateDiagnostics = async newState => {
|
|
|
1870
1870
|
};
|
|
1871
1871
|
set$6(newState.id, latest.oldState, newEditor);
|
|
1872
1872
|
await invoke$3('Editor.rerender', newState.id);
|
|
1873
|
+
return newEditor;
|
|
1873
1874
|
} catch (error) {
|
|
1874
1875
|
// @ts-ignore
|
|
1875
1876
|
if (error && error.message.includes('No diagnostic provider found')) {
|
|
@@ -6831,7 +6832,7 @@ const getEditorHoverInfo = async (editorUid, position) => {
|
|
|
6831
6832
|
} = hover;
|
|
6832
6833
|
const tokenizerPath = '';
|
|
6833
6834
|
const lineInfos = await tokenizeCodeBlock(displayString, displayStringLanguageId || fallbackDisplayStringLanguageId, tokenizerPath);
|
|
6834
|
-
const wordPart =
|
|
6835
|
+
const wordPart = getWordBefore(editor, rowIndex, columnIndex);
|
|
6835
6836
|
const wordStart = columnIndex - wordPart.length;
|
|
6836
6837
|
await measureTextBlockHeight(documentation, hoverDocumentationFontFamily, hoverDocumentationFontSize, hoverDocumentationLineHeight, hoverDocumentationWidth);
|
|
6837
6838
|
const {
|
|
@@ -6869,6 +6870,7 @@ const loadHoverContent = async state => {
|
|
|
6869
6870
|
documentation,
|
|
6870
6871
|
x,
|
|
6871
6872
|
y,
|
|
6873
|
+
width: 600,
|
|
6872
6874
|
diagnostics: matchingDiagnostics
|
|
6873
6875
|
};
|
|
6874
6876
|
};
|
|
@@ -8209,10 +8211,10 @@ const renderBounds$7 = {
|
|
|
8209
8211
|
const {
|
|
8210
8212
|
x,
|
|
8211
8213
|
y,
|
|
8214
|
+
width,
|
|
8212
8215
|
height
|
|
8213
8216
|
} = newState;
|
|
8214
|
-
|
|
8215
|
-
return [SetBounds, x, y, renderWidth, height];
|
|
8217
|
+
return [SetBounds, x, y, width, height];
|
|
8216
8218
|
}
|
|
8217
8219
|
};
|
|
8218
8220
|
const render$g = [renderHoverDom, renderBounds$7];
|
|
@@ -9595,6 +9597,7 @@ const commandMap = {
|
|
|
9595
9597
|
'Editor.typeWithAutoClosing': typeWithAutoClosing,
|
|
9596
9598
|
'Editor.undo': undo,
|
|
9597
9599
|
'Editor.unIndent': editorUnindent,
|
|
9600
|
+
'Editor.updateDiagnostics': updateDiagnostics,
|
|
9598
9601
|
'EditorCompletion.advance': advance,
|
|
9599
9602
|
'EditorCompletion.closeDetails': closeDetails,
|
|
9600
9603
|
'EditorCompletion.focusFirst': focusFirst,
|