Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Not scrolling to cursor #2659

Closed
Closed

Description

@kevinsawicki

Moving the cursor up/down to a long line does not seem to scroll the react editor horizontally.

Notice how the cursor is not visible when moved to line 167, I am moving the cursor left from the last line and the end of the previous line is not scrolled to even though the cursor is there.

scroll-on-up

Activity

  1. nathansobo commented on Jun 19, 2014

    @nathansobo
    Contributor

    Something changed to cause us to skip gutter measurement, which needs to be factored into the scroll width of the horizontal scrollbar now that it extends all the way across the editor. I moved the width measurement back into the gutter component itself, where we can base the decision on changes to the max line number digits and the character width.

    Investigated this, I discovered that because lines are absolutely positioned, there's still one tricky possibility: Characters that are wider than the defaultCharWidth can cause a line to be longer than our computed scroll width, which is only based on the defaultCharWidth. We really need to base the scroll width on the total width of the longest line based on its character widths. Absolute positioning is proving costly, but it's the key to avoiding full screen repaints.

  2. lock commented on Jan 26, 2019

    @lock

    This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!

  3. locked as resolved and limited conversation to collaborators on Jan 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions