deadpixi / sam

An updated version of the sam text editor.
Other
433 stars 47 forks source link

I can't mouse-wheel-scroll to the end of the document #60

Closed Screwtapello closed 7 years ago

Screwtapello commented 7 years ago

Steps to reproduce:

  1. Create a new, empty buffer
  2. Fill it with many lines of content by executing something like < seq 1000
  3. Scroll downward with the mousewheel until the buffer will scroll no further

Expected results:

Actual results:

Notes:

In normal editing buffers, this is a minor annoyance and the worst outcome is that you might have some trailing blank lines at the end of the file.

In the command window, this is highly annoying, since the command-window ignores anything that happens before its "input point", which is at the very end of the buffer. Multiple times, when I felt sam was doing something weird, I tried to make sure I was typing at the end of the command-window buffer by scrolling as far down as I could, and clicking past the last character at the end of the line to make sure I was "at the end". Of course, that only broke things: I wound up typing commands just before the trailing newline that I couldn't see off the bottom of the window, instead of just after it.

As a workaround, one can scroll down with keyboard shortcuts (at least with the default bindings) or by clicking button 3 repeatedly at the bottom of the scroll-bar, until only the insertion point is visible on the top-line of the window. Dragging the scroll-thumb with button 2 works on smaller files (such as the 1000-line demonstration above), but in a sufficiently large file the thumb becomes so small that even when dragged to the bottom of the track, the window is still several pages above the bottom of the file.

deadpixi commented 7 years ago

Please try the latest code in master and close this issue if it appears to be resolved. Thanks!

Screwtapello commented 7 years ago

Looks great, thanks!