Commit Graph

18 Commits

Author SHA1 Message Date
Kartik K. Agaram
de66b015bc Merge lines.love 2023-11-18 12:21:30 -08:00
Kartik K. Agaram
007b965b11 audit all asserts
Each one should provide a message that will show up within LÖVE. Stop
relying on nearby prints to the terminal.

I also found some unnecessary ones.

There is some potential here for performance regressions: the format()
calls will trigger whether or not the assertion fails, and cause
allocations. So far Lua's GC seems good enough to manage the load even
with Moby Dick, even in some situations that caused issues in the past
like undo.
2023-11-18 11:32:01 -08:00
Kartik K. Agaram
3547c18db6 Merge lines.love 2023-04-02 09:22:32 -07:00
Kartik K. Agaram
af239935ce minor cleanup and a todo for later 2023-04-01 20:40:47 -07:00
Kartik K. Agaram
a655c2113c bring back a level of wrapping
Many projects will require the ability to add metadata to lines, so
let's not drop that.
2022-08-15 11:00:35 -07:00
Kartik K. Agaram
778f77a458 superfluous line 2022-08-15 10:23:07 -07:00
Kartik K. Agaram
a85b984021 clean up a few more loose ends 2022-08-14 09:53:16 -07:00
Kartik K. Agaram
9d792a203b new fork: rip out drawing support 2022-08-14 09:20:14 -07:00
Kartik K. Agaram
4ce716fe44 line.y -> line_cache.starty in a few more places
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.
2022-07-27 20:45:46 -07:00
Kartik K. Agaram
29dac6a6ec separate data structure for each line's cache data
I have no idea what the performance implications of this are..
2022-07-17 21:05:01 -07:00
Kartik K. Agaram
5b91af1a66 add state arg to a few functions
- record_undo_event
  - undo_event
  - redo_event
  - snapshot
2022-07-12 16:55:32 -07:00
Kartik K. Agaram
8bbc1ffe34 group all editor globals
We're still accessing them through a global. But we'll change that next.
2022-07-12 15:24:56 -07:00
Kartik K. Agaram
c875f7be46 stop saving the entire file when modifying drawings
Now we just disallow that entirely.
2022-06-10 11:48:32 -07:00
Kartik K. Agaram
79a1241370 undo creating new drawings 2022-06-10 11:45:53 -07:00
Kartik K. Agaram
9bbfc2be13 crisp font rendering 2022-06-02 23:36:07 -07:00
Kartik K. Agaram
4f76ea37d7 more efficient undo/redo
Now the bottleneck shifts to applying undo/redo in large files. But
things should be snappy if you don't use the sluggish feature.
2022-06-02 17:46:30 -07:00
Kartik K. Agaram
22817492a3 rename 2022-06-02 16:44:18 -07:00
Kartik K. Agaram
670886240f after much struggle, a brute-force undo
Incredibly inefficient, but I don't yet know how to efficiently encode
undo mutations that can span multiple lines.

There seems to be one bug related to creating new drawings; they're not
spawning events and undoing past drawing creation has some weird
artifacts. Redo seems to consistently work, though.
2022-06-02 15:45:25 -07:00