Search and jump to display blank space #1694

Open
opened 2026-04-17 05:04:06 +02:00 by panhaiqing123 · 1 comment

In the measure function of the EditView class, there is a maximum of 5 calculations in the for loop for calculating jump anchors, which results in the final calculation of rendered content being greater than five times when the auto wrap setting is enabled. As a result, only the layout will be changed without updating the selection information and real content.

In the measure function of the EditView class, there is a maximum of 5 calculations in the for loop for calculating jump anchors, which results in the final calculation of rendered content being greater than five times when the auto wrap setting is enabled. As a result, only the layout will be changed without updating the selection information and real content.
Owner

This is not a normal effect of enabling line wrapping. There will be something else going on, such as an extension responding to viewport changes in a way that continues to affect the viewport. Just making this loop infinite is obviously not a good solution—the editor will hang, or at least respond very slowly, when this situation occurs.

If you can reduce the problem to a small, reasonable bit of code, I can take a look and see if I can debug what's going on.

This is not a normal effect of enabling line wrapping. There will be something else going on, such as an extension responding to viewport changes in a way that continues to affect the viewport. Just making this loop infinite is obviously not a good solution—the editor will hang, or at least respond very slowly, when this situation occurs. If you can reduce the problem to a small, reasonable bit of code, I can take a look and see if I can debug what's going on.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
codemirror/dev#1694
No description provided.