Commit Graph

277 Commits

Author SHA1 Message Date
Kartik K. Agaram 4854165630 Merge lines.love 2022-12-23 19:47:10 -08:00
Kartik K. Agaram 2b3e09ca0f make love event names consistent
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.
2022-12-23 18:52:28 -08:00
Kartik K. Agaram 7e3dc2bc34 Merge lines.love 2022-09-06 18:46:07 -07:00
Kartik K. Agaram 73fefa7d09 support selections in the source editor
I've only tested side A so far, and included a statement of how I want
side B to behave.
2022-09-06 10:05:20 -07:00
Kartik K. Agaram e0f750913f Merge lines.love 2022-09-05 12:47:27 -07:00
Kartik K. Agaram 528c64d690 support drawings in the source editor 2022-09-05 11:29:39 -07:00
Kartik K. Agaram 9fe2af3e34 stray edit from source_text.lua 2022-09-03 15:44:23 -07:00
Kartik K. Agaram e1c5a42f31 editing source code from within the app
integrated from pong.love via text.love:
  https://merveilles.town/@akkartik/108933336531898243
2022-09-03 14:13:22 -07:00
Kartik K. Agaram 42762ce062 editing source code from within the app
integrated from pong.love: https://merveilles.town/@akkartik/108933336531898243
2022-09-03 13:58:30 -07:00
Kartik K. Agaram 39b2c849c4 Merge lines.love 2022-08-23 15:50:01 -07:00
Kartik K. Agaram 89222f86a0 set color for each fragment
In general it seems like good practice to minimize assumptions about
the current color.
2022-08-23 15:09:14 -07:00
Kartik K. Agaram 43dfa184d6 helper: trimming whitespace from strings 2022-08-23 15:06:18 -07:00
Kartik K. Agaram 8d4346f3a8 Merge lines.love 2022-08-19 16:30:38 -07:00
Kartik K. Agaram cbd8f678d2 fix a name 2022-08-19 16:27:38 -07:00
Kartik K. Agaram 0c7bc1812d Merge lines.love 2022-08-18 13:48:33 -07:00
Kartik K. Agaram dd15f15640 couple of accidental globals
Luckily they didn't bite me yet.
2022-08-18 13:37:14 -07:00
Kartik K. Agaram 61b59f4dd6 Merge lines.love 2022-08-18 13:11:41 -07:00
Kartik K. Agaram 72866ec0ad get rid of some ridiculous code
I guess I wrote it before I settled into the idiom of:
* first change cursor
* then scroll if necessary
2022-08-18 13:04:04 -07:00
Kartik K. Agaram 0bf34a9ce0 spurious args 2022-08-18 12:09:50 -07:00
Kartik K. Agaram edcd3d7a9a dead code 2022-08-18 12:07:50 -07:00
Kartik K. Agaram 1d3c9f4708 generalize a function 2022-08-18 10:32:03 -07:00
Kartik K. Agaram a14f1096b6 extract a variable 2022-08-18 09:51:43 -07:00
Kartik K. Agaram f79dd4824c simplify 2022-08-18 00:19:07 -07:00
Kartik K. Agaram 2923ef3f49 Merge lines.love 2022-08-17 17:44:19 -07:00
Kartik K. Agaram 1221fde164 move caching behavior inside compute_fragments 2022-08-17 16:15:35 -07:00
Kartik K. Agaram 3a74e4bb6c remove some unnecessary work 2022-08-17 16:13:46 -07:00
Kartik K. Agaram 03f3034930 Merge lines.love 2022-08-17 09:51:17 -07:00
Kartik K. Agaram dd899d2096 standardize scroll check in a few places
I'm taking some lessons from pensieve.love here. It seem like specific
pixel thresholds don't matter too much for plain lines.love.

I'd probably feel safer if I just used Text.cursor_out_of_screen in
these places, but it means we draw the screen twice for most events[1].
Let's see if we can get by with the current approach.

[1] Or we have to start scheduling things for the next draw, which is
more complex to orchestrate.
2022-08-17 09:40:44 -07:00
Kartik K. Agaram f029c710b5 simplify cursor-on-screen check 2022-08-17 09:36:17 -07:00
Kartik K. Agaram f11c3f2a9b Merge lines.love 2022-08-17 09:17:00 -07:00
Kartik K. Agaram 1d710912cc swap return values 2022-08-17 09:10:52 -07:00
Kartik K. Agaram 68052e807b Merge lines.love 2022-08-17 07:48:44 -07:00
Kartik K. Agaram 4f128f39f3 obsolete comment 2022-08-16 13:38:10 -07:00
Kartik K. Agaram 1bd5d74b78 Merge lines.love
(I'm going to change the format of these commits to be more useful in
the presence of more than one level of upstream.)
2022-08-15 16:17:15 -07:00
Kartik K. Agaram eba973369e move 2022-08-15 16:07:32 -07:00
Kartik K. Agaram 5ac18cef45 Merge upstream 2022-08-15 15:57:10 -07:00
Kartik K. Agaram 333a0318d9 drop some unnecessary calls 2022-08-15 15:48:44 -07:00
Kartik K. Agaram 9e0cd4ad4c stop confusingly reading a global
The way Text.draw is called by edit.draw, we know it'll never be called
for lines above screen_top1.line. Comparing every line on screen with
screen_top1 makes no sense. The intent is really just to compare with
screen_top1 only for the first line, and otherwise to ignore this check.
2022-08-15 15:45:02 -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 9d792a203b new fork: rip out drawing support 2022-08-14 09:20:14 -07:00
Kartik K. Agaram d14e03d706 bugfix: handle drawings when updating screen top 2022-08-11 19:35:12 -07:00
Kartik K. Agaram 9ac68d710b rename 2022-08-11 19:34:18 -07:00
Kartik K. Agaram da34fabf72 bugfix: pagedown was sometimes bouncing up 2022-08-10 22:56:10 -07:00
Kartik K. Agaram ba48aadaa7 bugfix: backspace from start of final line 2022-08-10 22:38:10 -07:00
Kartik K. Agaram 8cfffdef41 unnecessary args 2022-08-10 22:29:39 -07:00
Kartik K. Agaram 0218980add click to the left of a line 2022-07-29 14:38:45 -07:00
Kartik K. Agaram 0251b3f0c2 bugfix: search
Broken since commit 188bbc73 9 days ago :/ At least we have a test for
it now.
2022-07-21 16:55:05 -07:00
Kartik K. Agaram d61b5dfdeb use line cache for drawings as well 2022-07-20 16:34:09 -07:00
Kartik K. Agaram e2734cd572 bugfix: where cursor is drawn
The published version of lines.love was broken for almost an hour. The
cursor would render one position to the right of where it really is. To
fix it, this commit rolls back 26ba6e4e5a. There doesn't seem a good
way to test it.
2022-07-20 09:11:29 -07:00
Kartik K. Agaram 88013000fc . 2022-07-20 07:50:33 -07:00