Commit Graph

21 Commits

Author SHA1 Message Date
Kartik K. Agaram 6125a02764 Merge driver.love 2023-10-28 01:26:13 -07:00
Kartik K. Agaram db1e163956 Merge luaML.love 2023-10-28 01:21:50 -07:00
Kartik K. Agaram 50e84c9b44 bugfix: switch text_input to new panning impl 2023-10-27 23:01:46 -07:00
Kartik K. Agaram 45c32104a8 Merge driver.love 2023-10-25 21:03:14 -07:00
Kartik K. Agaram c1a3a74075 Merge luaML.love 2023-10-25 20:47:17 -07:00
Kartik K. Agaram 8c73b2f783 Merge luaML.love 2023-10-25 20:05:59 -07:00
Kartik K. Agaram f6f13542a2 document this very important lesson
I had it once already in my grasp, in pensieve.love, but it slipped
through my fingers. Let's see if this attempt sticks.
2023-10-25 19:47:27 -07:00
Kartik K. Agaram 45c1e42de2 snapshot: a cleaner organization
scenarios:
  * Zoom = 1
    * pan with mouse: ✓
    * pan with up arrow: ✓
    * pan with down arrow: ✓
  * Zoom < 1
    * pan with mouse: ✓
    * pan with up arrow: ✓
    * pan with down arrow: ✗
  * Zoom > 1
    * pan with mouse: ✓
    * pan with up arrow: ✗
    * pan with down arrow: ✓

What ✓ means:
* pan with mouse: lines don't slide relative to the surface
  * will still slide relative to the surface when zooming in/out;
    that's unavoidable because we want integer pixels for crisp text
* pan with keyboard: at least some part of cursor is always peeking within the viewport
  * might still look ugly, with the line containing the cursor almost invisible,
    but hitting the down arrow will never pan upwards, or vice versa

Still not working though. I'm pretty much guaranteeing by construction that if
Viewport.y was set from screen_top1, then screen_top1 will not be perturbed.
And yet using scale() inside update_editor_box is incorrect. Hmm..
2023-10-25 16:49:39 -07:00
Kartik K. Agaram 0a37b1b80c revert commit 4c8960b5c7
Well, almost. I'm just reminding myself of the sort of plumbing I need,
not reintroducing the old logic that never worked right and had
undergone n iterations of corruption.
2023-10-25 16:23:28 -07:00
Kartik K. Agaram 09b8f985db backport a bugfix from driver.love
Ignore typing if cursor isn't in viewport.
2023-10-22 11:45:48 -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 d280f2fad7 ignore keystrokes when cursor off screen 2023-10-17 22:15:42 -07:00
Kartik K. Agaram 22153ad301 bugfix: computing definition names
scenario:
- create a new definition with ctrl+n
- type in an initial comment
- hit enter
- type in a definition like 'Foo = nil'
- hit F4
- close and restart the driver

Before this commit, the definition no longer showed up on the surface.
(Adding it a second time worked fine.)

I wish I'd included this fix in merge commit 1267010251 back in July.
2023-10-17 11:51:49 -07:00
Kartik K. Agaram 04f1ce5b9f Merge driver.love 2023-10-15 16:09:38 -07:00
Kartik K. Agaram 59f16848b2 bugfix: consistently map definitions to names
I created this bug when I implemented GET*, but it was already latent
before that, when I lazily used get_cmd_from_buffer to get the
definition name from buffer instead of creating two different names with
identical definitions.
2023-10-15 16:03:43 -07:00
Kartik K. Agaram a9751ef1e4 get rid of manifests 2023-06-18 19:08:29 -07:00
Kartik K. Agaram 3917fa9d94 get rid of animation and editor movement
Editors also have some padding within their borders.
2023-06-18 13:04:18 -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