Edit and undo in (large) set of hidden lines causes display update corruption #483

Closed
opened 2012-04-05 08:49:42 +02:00 by marijnh · 2 comments
marijnh commented 2012-04-05 08:49:42 +02:00 (Migrated from gitlab.com)
  1. Download https://gist.github.com/2308512
  2. Put the current codemirror.css/codemirror.js next to it and open it in a browser (I'm using Mac Chrome)
  3. Click buttons 1, 2, and 3 in sequence--this hides all the "Hidden line" lines, adds 10 newlines in the hidden portion, then hides those newlines
    -> Note that one blank line does not appear to be hidden--this is the first bug
  4. Click button 4 to undo
  5. Click in the editor in the middle of the text and start typing

Result: Display gets corrupted--many lines appear deleted, typed characters appear on the wrong line.

Note that in order for this bug to occur, the number of hidden lines has to be larger than the 100-line buffer around the set of visible lines that gets rendered in updateDisplay().

1. Download https://gist.github.com/2308512 2. Put the current codemirror.css/codemirror.js next to it and open it in a browser (I'm using Mac Chrome) 3. Click buttons 1, 2, and 3 in sequence--this hides all the "Hidden line" lines, adds 10 newlines in the hidden portion, then hides those newlines -> Note that one blank line does not appear to be hidden--this is the first bug 4. Click button 4 to undo 5. Click in the editor in the middle of the text and start typing Result: Display gets corrupted--many lines appear deleted, typed characters appear on the wrong line. Note that in order for this bug to occur, the number of hidden lines has to be larger than the 100-line buffer around the set of visible lines that gets rendered in updateDisplay().
marijnh commented 2012-04-05 09:56:08 +02:00 (Migrated from gitlab.com)

mentioned in issue #484

mentioned in issue #484
marijnh (Migrated from gitlab.com) closed this issue 2012-04-17 14:57:33 +02:00
marijnh commented 2012-04-17 14:58:43 +02:00 (Migrated from gitlab.com)

Thanks for the super-detailed test case. If only all bug reports came with a demo like this!

Thanks for the super-detailed test case. If only all bug reports came with a demo like this!
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
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/codemirror5#483
No description provided.