Skip to content

Moving the caret past the *left* of the screen does not scroll the editor #6192

@LoganDark

Description

@LoganDark

Description

Moving your caret to the left (that is, outside the visible bounds of the editor) does not scroll the editor until the caret is quite far off screen.

Video. In the video I move my caret past the left edge of the screen and insert a b, all without being able to see what I'm doing. Then I use the scrollbar to scroll the b into view, showing that I was able to insert it without the editor scrolling.

Expected Behavior

The editor should scroll to keep the caret on-screen at all times. It does this with the right edge, but not the left one.

Current Behavior

The editor does not keep the caret on-screen at all times if you are moving it to the left.

Steps to Reproduce

  1. Scroll the editor horizontally to the right
  2. You can move your caret off-screen to the left and it won't scroll the editor immediately
  3. If you go far enough to the left, the editor will scroll as expected

Your Environment

  • Processing version: 3.5.4
  • Operating System and OS version: Windows 10 Home 2004 build 19041.928
  • Other information: N/A

Possible Causes / Solutions

The editor seems to consider the line number gutter a part of the visible area, so when the caret is behind it, it does not scroll the caret into view.

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