CodeEditApp / CodeEditSourceEditor

A code editor view written in Swift powered by tree-sitter.
https://codeeditapp.github.io/CodeEditSourceEditor/documentation/codeeditsourceeditor
MIT License
504 stars 74 forks source link

🐞Horizontal scrolling with rubberbanding #158

Closed matthijseikelenboom closed 1 year ago

matthijseikelenboom commented 1 year ago

Description

It's currently possible to scroll horizontally in the TextView. That's fine, VSCode also does this. Xcode, however, does not.

Currently, when all of the files content is in view, it's still possible to scroll horizontally, with rubberband effect. This isn't desired.

If we want to follow Xcode specifically, then horizontal scrolling should be removed and text should be wrapped when it doesn't fit on screen. But I like the idea to put this as a setting more, where the user can choose to use the VSCode or Xcode style.

To Reproduce

  1. Open a file
  2. Scroll horizontally.

Expected behavior

N/A

Version information

CodeEditTextView: [0.0.3-alpha 29] macOS: [13.2.1] Xcode: [14.2]

Additional context

No response

austincondiff commented 1 year ago

This is controlled with this setting under Text Editing...

image

That said, when it is changed, the editor does not respond. To see the changes take effect, the user must close and reopen the file. This needs to be fixed to reflect changes immediately after the user clicks the checkbox.

matthijseikelenboom commented 1 year ago

Oh didn't know that was a setting already. Should be default enabled if you ask me. It's also possible to always scroll to the right, even if everything is in view/on screen.

austincondiff commented 1 year ago

@matthijseikelenboom that scrolling is most likely caused by #148.