Skip to content

Commit 430ee2d

Browse files
committed
Fix bad assumption in skipAtomic
Closes codemirror#3846
1 parent 3f752d0 commit 430ee2d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/codemirror.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2264,7 +2264,8 @@
22642264
}
22652265

22662266
var far = m.find(dir < 0 ? -1 : 1);
2267-
if (dir < 0 ? m.inclusiveLeft : m.inclusiveRight) far = movePos(doc, far, dir, line);
2267+
if (dir < 0 ? m.inclusiveLeft : m.inclusiveRight)
2268+
far = movePos(doc, far, dir, far.line == pos.line ? line : null);
22682269
return far ? skipAtomicInner(doc, far, pos, dir, mayClear) : null;
22692270
}
22702271
}

0 commit comments

Comments
 (0)