| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
| |
I want the words to be easy to read, and to use a consistent tense.
update and focus seem more timeless; let's make everything like those.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Not directly relevant here, but forks of this project that permit
zooming can run into weird glitches if margins are not a whole number of
pixels.
I'd always assumed a type system that divided ints into floats was
strictly superior, but now I have experienced a situation where
requiring ints isn't just a compromise for the underlying CPU
implementation. Particularly since Lua's print() silently hides really
tiny fractions.
|
| |
|
|
|
|
|
|
|
|
|
| |
We had a regression since commit 60e1023f0 on Nov 27. Turns out we do
need the ancient hack after all.
But no, we won't go back to the hack. It's a simple problem to fix
right. And while we're at it, we'll fix the test harness to be more
realistic so it would have caught this problem.
|
| |
|
| |
|
|
|
|
| |
We only need time differences.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
integrated from pong.love via text.love:
https://merveilles.town/@akkartik/108933336531898243
|
| |
|
|
|
|
|
|
| |
This is compatible with Javascript, and it also seems like a better
default; when people forget to think about return values in click
handlers, they should be consumed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Symptom: a test (test_click_to_create_drawing) started randomly failing
after I inserted a `return` 2 commits ago.
Cause: my tests call edit.draw, but button handlers only get cleared in
app.draw. So my tests weren't clearing button handlers, and every call
to edit.draw was accumulating states. Still unclear why those were going
to different state objects after the `return`, but anyway. I'm not going
to understand every last thing that happens when things go wrong, just
guarantee they can't go wrong. And the way to do that is to decentralize
button handlers to each state that receives them.
The State object in buttons.lua doesn't have to be Editor_state. It just
has to be some table that provides a Schelling Point for shared state.
|
|
|
|
| |
Most button onpress1 handlers will want to return true.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Disquieting that none of my tests caught these. On the other hand, I
also haven't noticed any issues in practice. Perhaps cache invalidation
is often unnecessary.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
I have no idea what the performance implications of this are..
|
| |
|
|
|
|
| |
- Text.to_pos_on_line
|
|
|
|
| |
- Text.in_line
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
It's starting to sink in that I don't want hard-coded constants inside
objects.
|
| |
|
| |
|
|
|
|
|
|
| |
The previous commit was failing inside a test that I can't reproduce
manually. Perhaps it's something about how often draw/update run in
practice. Anyways, it's definitely uncovered a real issue.
|
|
|
|
|
|
|
|
|
| |
- Drawing.draw_shape
- Drawing.draw_pending_shape
- Drawing.in_drawing
- Drawing.find_or_insert_point
- Drawing.near
- Drawing.pixels
|
| |
|
| |
|
|
|
|
|
| |
Editor state initialization now depends on window dimensions, so we have
to more carefully orchestrate startup.
|
|
|
|
|
|
|
| |
- Drawing.current_drawing
- Drawing.select_shape_at_mouse
- Drawing.select_point_at_mouse
- Drawing.select_drawing_at_mouse
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Text.cursor_at_final_screen_line
- Text.move_cursor_down_to_next_text_line_while_scrolling_again_if_necessary
- Text.snap_cursor_to_bottom_of_screen
- Text.in_line
- Text.to_pos_on_line
- Text.to2
- Text.to1
- Text.previous_screen_line
- Text.tweak_screen_top_and_cursor
- Text.redraw_all
|
|
|
|
|
| |
- Text.pos_at_start_of_cursor_screen_line
- Text.cursor_past_screen_bottom
|
|
|
|
|
| |
- Text.search_next
- Text.search_previous
|
|
|
|
|
|
|
| |
- record_undo_event
- undo_event
- redo_event
- snapshot
|