atom-archive / xray

An experimental next-generation Electron-based text editor
MIT License
8.48k stars 235 forks source link

Horizontal scrolling #90

Closed as-cii closed 6 years ago

as-cii commented 6 years ago

This pull request adds the ability to scroll the editor horizontally via the mouse wheel, as well as autoscrolling when the cursor moves. This feature took a couple of days to get implemented because we wanted to find a way of efficiently maintaining the longest line in a given range. This will not only be useful for horizontal scrolling, but will be reused when we will introduce a "display map" to handle folds and soft-wraps. A few highlights related to the proposed changes:

/cc: @nathansobo