@codemirror/view 6.39.12 → 6.39.13
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/CHANGELOG.md +8 -0
- package/dist/index.cjs +2 -2
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## 6.39.13 (2026-02-08)
|
|
2
|
+
|
|
3
|
+
### Bug fixes
|
|
4
|
+
|
|
5
|
+
Fix an issue where a widget at start or end of line, when wrapped to cover that whole line, could block vertical cursor motion.
|
|
6
|
+
|
|
7
|
+
Fix an issue `EditorView.moveVertically` that would sometimes cause selection-extending vertical motion to get stuck on line wrapping points.
|
|
8
|
+
|
|
1
9
|
## 6.39.12 (2026-01-30)
|
|
2
10
|
|
|
3
11
|
### Bug fixes
|
package/dist/index.cjs
CHANGED
|
@@ -3660,7 +3660,7 @@ function moveVertically(view, start, forward, distance) {
|
|
|
3660
3660
|
return state.EditorSelection.cursor(startPos, start.assoc);
|
|
3661
3661
|
let goal = start.goalColumn, startY;
|
|
3662
3662
|
let rect = view.contentDOM.getBoundingClientRect();
|
|
3663
|
-
let startCoords = view.coordsAtPos(startPos, start.assoc || -1), docTop = view.documentTop;
|
|
3663
|
+
let startCoords = view.coordsAtPos(startPos, (start.empty ? start.assoc : 0) || (forward ? 1 : -1)), docTop = view.documentTop;
|
|
3664
3664
|
if (startCoords) {
|
|
3665
3665
|
if (goal == null)
|
|
3666
3666
|
goal = startCoords.left - rect.left;
|
|
@@ -3744,7 +3744,7 @@ function posAtCoords(view, coords, precise, scanY) {
|
|
|
3744
3744
|
if (scanY < 0 ? block.to < view.viewport.from : block.from > view.viewport.to)
|
|
3745
3745
|
break;
|
|
3746
3746
|
// Check whether we aren't landing on the top/bottom padding of the line
|
|
3747
|
-
let rect = view.docView.coordsAt(scanY < 0 ? block.from : block.to, scanY);
|
|
3747
|
+
let rect = view.docView.coordsAt(scanY < 0 ? block.from : block.to, scanY > 0 ? -1 : 1);
|
|
3748
3748
|
if (rect && (scanY < 0 ? rect.top <= yOffset + docTop : rect.bottom >= yOffset + docTop))
|
|
3749
3749
|
break;
|
|
3750
3750
|
}
|
package/dist/index.js
CHANGED
|
@@ -3656,7 +3656,7 @@ function moveVertically(view, start, forward, distance) {
|
|
|
3656
3656
|
return EditorSelection.cursor(startPos, start.assoc);
|
|
3657
3657
|
let goal = start.goalColumn, startY;
|
|
3658
3658
|
let rect = view.contentDOM.getBoundingClientRect();
|
|
3659
|
-
let startCoords = view.coordsAtPos(startPos, start.assoc || -1), docTop = view.documentTop;
|
|
3659
|
+
let startCoords = view.coordsAtPos(startPos, (start.empty ? start.assoc : 0) || (forward ? 1 : -1)), docTop = view.documentTop;
|
|
3660
3660
|
if (startCoords) {
|
|
3661
3661
|
if (goal == null)
|
|
3662
3662
|
goal = startCoords.left - rect.left;
|
|
@@ -3740,7 +3740,7 @@ function posAtCoords(view, coords, precise, scanY) {
|
|
|
3740
3740
|
if (scanY < 0 ? block.to < view.viewport.from : block.from > view.viewport.to)
|
|
3741
3741
|
break;
|
|
3742
3742
|
// Check whether we aren't landing on the top/bottom padding of the line
|
|
3743
|
-
let rect = view.docView.coordsAt(scanY < 0 ? block.from : block.to, scanY);
|
|
3743
|
+
let rect = view.docView.coordsAt(scanY < 0 ? block.from : block.to, scanY > 0 ? -1 : 1);
|
|
3744
3744
|
if (rect && (scanY < 0 ? rect.top <= yOffset + docTop : rect.bottom >= yOffset + docTop))
|
|
3745
3745
|
break;
|
|
3746
3746
|
}
|