Skip to content

Subsequent text is not rendered after resized and refresh() with lineWrapping: true #6228

@ktsn

Description

@ktsn

Reproducible Environment

  • CodeMirror: v5.52.2
  • Browsers
    • Chrome: 80.0.3987.163
    • Firefox: 75.0
    • Safari: 13.1 (15609.1.20.111.8)
  • OS
    • macOS 10.15.4

Reproduction

https://jsfiddle.net/ktsn/aur7wt3L/14/

  1. Open the page.

  2. Scroll the editor slowly for the bottom.

  3. The text after ************************************* is not rendered even though it is in viewport.

    image

  4. Scroll further and the text will be rendered.

Expected behavior

The text should be rendered at step 3 where the text is in viewport.

Details

This issue happens when we:

  1. set lineWrapping: true,
  2. had set text in narrower width and
  3. set width wider and call refresh() after 2.

Looks like height is calculated for each line on 2 and the value is too large as width is small at the moment, then even though we refresh() on 3, the height of lines are not updated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions