2 Dimensional scroll issue

Open
#64 2 comments 4 reactions 1 assignee View on GitHub

@MegatronKing is already working on this.

Since Feb 13, 2025.

Assessment

This issue has not been assessed yet.

Description

bug

Describe the bug
When word wrap is off; dragging the vertical scroll thumb through many lines (With varying lengths) interaction will be dropped frequently.
This is not a problem if word wrap is on, or if there are no lines extend past the edge of the editor window.

To Reproduce
Word wrap set to false, and lines of different lengths that extend past the right edge (that require horizontal scrolling)

Expected behavior
Should be able to click and drag the thumb from top to bottom.

Device:

  • OS: Windows
  • Version 11

Additional context
I tracked it down to an issue with recalculating the width for the horizontal scrollbar.
When vertically scrolling, any time the longest line in the _displayparagraphs changes; the horizontal scrollbar updates and interaction with the handle is lost.

Not a proper solution; but my quick workaround is adding a function in code_lines to iterate through and return the longest segment
Then in _code_field
final double maxWidth = (_codes.longestSegmentLength * 6).reduce(max); //_displayParagraphs.map((e) => e.width).reduce(max);

Dominant language
Dart
Stars
761
Forks
102
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from reqable/re-editor

All issues in reqable/re-editor

Similar issues

More Dart issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.