@lvce-editor/editor-worker 19.77.1 → 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;
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/editor-worker",
3
- "version": "19.77.1",
3
+ "version": "19.77.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git@github.com:lvce-editor/editor-worker.git"