about summary refs log tree commit diff stats
path: root/app.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2023-09-15 08:52:39 -0700
committerKartik K. Agaram <vc@akkartik.com>2023-09-15 08:52:39 -0700
commitbafc45b028ad8db3d8be51cf1a09b7f118d75503 (patch)
tree28da99013b98a30b48783e72fc6c57d7db9c1f3f /app.lua
parent0a12e4c733a2483eef840fb82aec4f4f6ec68b3c (diff)
downloadview.love-bafc45b028ad8db3d8be51cf1a09b7f118d75503.tar.gz
bugfix: crash when using mouse wheel
All the Text functions assume the cursor is always on a text line. I was
violating that invariant.

* When scrolling up, I start the cursor at the top-most line below the
  screen top.

* When scrolling down, I start the cursor at the top-most line below the
  screen bottom.

  I think it would feel slightly more natural for it to be the
  bottom-most line above the screen bottom.

  However, the Text functions maintain an invariant that the bottom-most
  line in a buffer will be text. There's no such invariant for the
  top-most line.
Diffstat (limited to 'app.lua')
0 files changed, 0 insertions, 0 deletions