9fans / plan9port

Plan 9 from User Space
https://9fans.github.io/plan9port/
Other
1.64k stars 326 forks source link

Bug: Acme: Scrolling is not deterministic for long lines #668

Open spektrokalter opened 1 month ago

spektrokalter commented 1 month ago

Expected behavior

When I scroll with button 3, the line next to the cursor always goes to the beginning of the visible area. Similarly, If the line is long and broken (wordwrapped) by Acme, clicking on the line's second part pushes it to the beginning of the visible area.

Clicking button 1 on the same place must, and in most cases does, pull the line back to its original place. If the line is long and broken by Acme, though, button 1 must guarantee that the visible part of the line goes back.

Unexpected behavior

If the first visible line is long and broken by Acme, button 1 does not pull it's visible part to the cursor's location.

Steps to reproduce the problem

The problem typically occurs when Acme breaks long lines. Find a long line, make Acme break it, and scroll with buttons 3 and 1 on the line's first or second part.

Another weird behavior is exhibited by the first visible line broken by Acme. Try to scroll it's second part with buttons 3 and 1. On button 1, the whole line goes to its original place except it's first character.

See demo for visual demonstration of the two cases.

https://github.com/user-attachments/assets/449b405f-c45f-449a-9370-eea96aacae68

Sometimes even the beginning of the long line does not return. I couldn't identify the exact cause, though, but there's a demo.

https://github.com/user-attachments/assets/f90376ca-0270-46ea-8b00-b2cb3d965105

plan9port version

a2567fcac9851e5cc965a236679f568b0e79cff2

OS version

macOS 14.5 (23F79)