Commit Graph

16 Commits

Author SHA1 Message Date
Kartik K. Agaram 72698c4204 Merge driver.love 2023-10-22 20:04:41 -07:00
Kartik K. Agaram f112dfea3d Merge luaML.love 2023-10-22 20:02:56 -07:00
Kartik K. Agaram e93b2796d2 let's see if this is easier to understand in 6 mos
I spent 4 days agonizing over a bug in driver.love, working up the
courage to think about it, and then a whole day trying to make sense of
scrolling and deeply questioning my right to tell anyone anything about
programming.
2023-10-22 19:50:08 -07:00
Kartik K. Agaram 4e01932cf6 bugfix
scenario:
  definition extends above and below viewport
  position cursor at bottom of viewport
  press down arrow

Before this commit, the viewport would sometimes not scroll, and the
cursor would go out of view.

I spent 4 days agonizing over this and working up the courage to think
about it, then a whole day trying to make sense of scrolling and deeply
questioning my right to tell anyone anything about programming, and it's
too early to say I _understand_ this fix. Regardless, it seems clear
that the interplay between edit.lua and update_editor_box and
schema1_to_y is deeply subtle and likely hiding more bugs.

There's still one open issue:
  definition starts halfway down the viewport and extends down below viewport
  position cursor at bottom of viewport
  press down arrow

The surface jarringly scrolls way more than it needs to just to keep the
cursor in view.

And I'm terrified to try to fix this.

Then again, perhaps I should try to port over
bring_cursor_of_cursor_pane_in_view from pensieve.love. That might get
rid of this abyss.
2023-10-22 19:39:54 -07:00
Kartik K. Agaram d5e4443a64 Merge driver.love 2023-10-21 10:21:38 -07:00
Kartik K. Agaram ac305b8e6c Merge luaML.love 2023-10-21 10:12:09 -07:00
Kartik K. Agaram 4c8960b5c7 greatly simplify layout
I don't know why this was so hard, but I don't need this variable
preserve_screen_top_of_cursor_node at all. We only set it when the
cursor is in some node, but we also only check for when the current node
is the cursor. Comparing with a nil cursor node works just as well.

I've also checked that driver.love doesn't need
preserve_screen_top_of_cursor_node. I think it came from pensieve.love,
where I've since taken it out. Did I ever need it even there?
2023-10-21 09:57:44 -07:00
Kartik K. Agaram c8cd9bb6b6 start rendering file picker on the surface as well
This will make things more consistent in the long term, but I realize
one major cost: our button abstraction doesn't work well with luaML and
compute_layout. So we need something to replace it.
2023-06-21 22:28:56 -07:00
Kartik K. Agaram 5b91bc288c new fork: pothi
Second attempt based on driver.love
2023-06-18 11:16:58 -07:00
Kartik K. Agaram fb4149f4c7 regression: revert commit d54fc8ec3a
I don't follow why luaML doesn't need this, but driver does.

Scenario: press ctrl+- repeatedly
Before this commit text was overflowing boxes.
2023-04-30 22:37:06 -07:00
Kartik K. Agaram 2a59e38c54 Merge luaML.love 2023-04-30 22:09:11 -07:00
Kartik K. Agaram d54fc8ec3a this bit of commit 0e3f1f773 is unnecessary 2023-04-22 22:56:44 -07:00
Kartik K. Agaram 0e3f1f7732 bugfix: size text/box when changing zoom
This is a backport from driver.love
2023-04-22 22:27:30 -07:00
Kartik K. Agaram bcd0522200 indent 2023-04-22 22:21:42 -07:00
Kartik K. Agaram 2d5abe140b make order of files consistent with upstream
Luckily I only had a chance to mess this up in one fork.

And I don't need to actually make any changes because my definitions are
order-independent.
2023-04-22 18:50:18 -07:00
Kartik K. Agaram b138f1ff9b Merge template-live-editor 2023-04-16 11:30:56 -07:00