mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
d042d15a5097ed4ae6672c9730ef2b4dc7a835ca
Fixes #2815 This commit changes our autoscroll strategy for cursors significantly. Originally, we were autoscrolling whenever the cursor's marker changed positions. This worked well, except we didn't end up autoscrolling when the user *attempted* to move the cursor to an invalid position, such as moving down at the end of the buffer, due to the fact that the marker wouldn't change. Then, we moved to always requesting an autoscroll whenever a position change was requested via Cursor::changePosition. This missed out on moving the cursor when inserting text, so we then also added an explicit autoscroll call when inserting text. This had the problem of not autoscrolling due to undo. So finally, this solution combines explicit autoscroll in ::changePosition to capture intent, as well as implicit autoscrolling whenever the cursor's marker position changes due to a textual change in the buffer. This captures undo/redo correctly.
Atom is a hackable text editor for the 21st century, built on atom-shell, and based on everything we love about our favorite editors. We designed it to be deeply customizable, but still approachable using the default configuration.
Visit atom.io to learn more.
Installing
Download the latest Atom release.
Atom will automatically update when a new release is available.
Building
Developing
Check out the guides and the API reference.
Description
Languages
JavaScript
88.3%
Less
8.7%
CoffeeScript
2.8%
Shell
0.1%
