@lvce-editor/editor-worker 19.77.0 → 19.77.2

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 CHANGED
@@ -9842,8 +9842,9 @@ const moveToPositionRight = (selections, i, rowIndex, columnIndex, lines, getDel
9842
9842
  }
9843
9843
  const line = lines[rowIndex];
9844
9844
  if (columnIndex >= getLineLength(line)) {
9845
- selections[i] = selections[i + 2] = rowIndex + 1;
9846
- selections[i + 1] = selections[i + 3] = 0;
9845
+ const isLastRow = rowIndex === lines.length - 1;
9846
+ selections[i] = selections[i + 2] = isLastRow ? rowIndex : rowIndex + 1;
9847
+ selections[i + 1] = selections[i + 3] = isLastRow ? getLineLength(line) : 0;
9847
9848
  } else {
9848
9849
  const delta = getDelta(line, columnIndex);
9849
9850
  selections[i] = selections[i + 2] = rowIndex;
@@ -17395,7 +17396,7 @@ const intialize = async (syntaxHighlightingEnabled, syncIncremental) => {
17395
17396
  };
17396
17397
 
17397
17398
  const largeFileContentLength = 10 * 1024 * 1024;
17398
- const editorFileCacheMaxBytes = 500_000;
17399
+ const editorFileCacheMaxBytes = 10 * 1024 * 1024;
17399
17400
  const pendingFileReads = new Map();
17400
17401
  const getFileStatFingerprint = stat => {
17401
17402
  if (!stat || typeof stat !== 'object' || !Number.isFinite(stat.size)) {
@@ -10246,8 +10246,9 @@ const moveToPositionRight = (selections, i, rowIndex, columnIndex, lines, getDel
10246
10246
  }
10247
10247
  const line = lines[rowIndex];
10248
10248
  if (columnIndex >= getLineLength(line)) {
10249
- selections[i] = selections[i + 2] = rowIndex + 1;
10250
- selections[i + 1] = selections[i + 3] = 0;
10249
+ const isLastRow = rowIndex === lines.length - 1;
10250
+ selections[i] = selections[i + 2] = isLastRow ? rowIndex : rowIndex + 1;
10251
+ selections[i + 1] = selections[i + 3] = isLastRow ? getLineLength(line) : 0;
10251
10252
  } else {
10252
10253
  const delta = getDelta(line, columnIndex);
10253
10254
  selections[i] = selections[i + 2] = rowIndex;
@@ -17799,7 +17800,7 @@ const intialize = async (syntaxHighlightingEnabled, syncIncremental) => {
17799
17800
  };
17800
17801
 
17801
17802
  const largeFileContentLength = 10 * 1024 * 1024;
17802
- const editorFileCacheMaxBytes = 500_000;
17803
+ const editorFileCacheMaxBytes = 10 * 1024 * 1024;
17803
17804
  const pendingFileReads = new Map();
17804
17805
  const getFileStatFingerprint = stat => {
17805
17806
  if (!stat || typeof stat !== 'object' || !Number.isFinite(stat.size)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/editor-worker",
3
- "version": "19.77.0",
3
+ "version": "19.77.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git@github.com:lvce-editor/editor-worker.git"