Commit Graph

85 Commits

Author SHA1 Message Date
Kartik K. Agaram 26860b0848 Merge capture.love 2023-12-29 13:39:07 -08:00
Kartik K. Agaram d7e8e46a4e Merge lines.love 2023-12-29 13:26:01 -08:00
Kartik K. Agaram bd2179d8aa bugfix
scenario: run without config file, quit, run again
expected: font size remains the same on second run

Before this commit it was increasing on each run.
It turns out the font height that you pass into love.graphics.newFont()
is not the result of font:getHeight().
2023-12-29 11:52:28 -08:00
Kartik K. Agaram 0f4aea6db7 pull font into editor
Now it adjusts the current font for itself.
And it's up to the caller to adjust the current font after.
2023-12-29 11:18:41 -08:00
Kartik K. Agaram e2c951a908 Merge capture.love 2023-11-18 11:54:53 -08:00
Kartik K. Agaram ed33304b72 Merge lines.love 2023-11-18 11:54:21 -08:00
Kartik K. Agaram e88b138f8a Merge capture.love 2023-10-28 00:52:18 -07:00
Kartik K. Agaram cc9fe3ff83 Merge lines.love 2023-10-28 00:51:40 -07:00
Kartik K. Agaram aa9a0b0b15 use my name for a dir 2023-10-27 23:58:42 -07:00
Kartik K. Agaram 53ff3d5680 Merge capture.love 2023-09-08 14:51:50 -07:00
Kartik K. Agaram 09934bf4e0 support notes directories outside save dir
This isn't very polished. I'm going to not bother when I'm the only
user.
2023-09-08 14:37:56 -07:00
Kartik K. Agaram a983e1f989 Merge capture.love 2023-07-11 09:35:59 -07:00
Kartik K. Agaram 44f6aaabdf Merge lines.love 2023-07-11 09:28:22 -07:00
Kartik K. Agaram 52ba030eaa drop an unused arg 2023-07-11 08:36:42 -07:00
Kartik K. Agaram f8c8c0aa8f Merge capture.love 2023-07-10 18:00:44 -07:00
Kartik K. Agaram b18d39528b Merge lines.love 2023-07-10 17:45:58 -07:00
Kartik K. Agaram bca7f82598 standardize between run and source some more
We shouldn't be thinking about saving settings when we're initializing
window geometry.
2023-07-10 17:16:58 -07:00
Kartik K. Agaram 7f4c5f847b simplify saving settings
We don't ever call one app's settings while Current_app is the other.
2023-07-10 17:14:38 -07:00
Kartik K. Agaram a8747478ff bugfix: Windows pushing title bar off screen
I'm learning the hard way that resizing the window is a big deal. Only
do this when someone explicitly requests it, otherwise follow LÖVE's
defaults.

Therefore we're also going to stop trying to be smart when showing the
log browser. Leave window resizing to manual operations.

Now initialization looks a lot more similar for the run and source apps.
2023-07-10 17:09:09 -07:00
Kartik K. Agaram 3f52063d02 delete flags that have never been exercised
Initialization is getting complex, and I'm finding bugs.
2023-07-10 16:33:17 -07:00
Kartik K. Agaram b42f08cb79 bugfix: preserve window position
I just noticed we hadn't got this bugfix for Linux on the main app. How
had we not noticed this issue before? Answer: lines.love windows tend to
be tall and skinny, and resize must keep the window entirely within the
screen. So the window was staying in place just because it happened to
be running up against the bottom.
2023-07-10 16:08:18 -07:00
Kartik K. Agaram f8c9624832 Merge capture.love 2023-06-08 01:08:43 -07:00
Kartik K. Agaram 62a395598c Merge lines.love 2023-06-08 01:08:07 -07:00
Kartik K. Agaram 14c08f9bd9 several bugfixes in saving/loading cursor position 2023-06-08 01:02:54 -07:00
Kartik K. Agaram 509e2c91d8 Merge capture.love 2023-06-04 12:37:08 -07:00
Kartik K. Agaram baf314ed91 Merge lines.love 2023-06-04 12:36:55 -07:00
Kartik K. Agaram f1886391c5 some temporary logging to catch a bug
The bug has been spotted twice:

1. In snap.love, I selected text in one node, then another, and hit:
  Error: text.lua:789: attempt to compare nil with number
  stack traceback:
    text.lua:789: in function 'lt1'
    select.lua:19: in function 'clip_selection'
    text.lua:32: in function 'draw'
    edit.lua:117: in function 'draw'
    [string "REPL"]:21: in function 'draw'
    main.lua:152: in function 'draw'
    app.lua:102: in function <app.lua:84>
    [C]: in function 'xpcall'
    app.lua:112: in function <app.lua:111>
    [C]: in function 'xpcall'

  Couldn't reproduce.

2. In text.love, inscript selected all text in a small buffer and then
   clicked outside the text. And got:

  Error: text.lua:784: attempt to compare nil with number
  Traceback
    [love "callbacks.lua"]:228: in function 'handler'
    text.lua:784: in function 'lt1'
    select.lua:19: in function 'clip_selection'
    text.lua:27: in function 'draw'
    edit.lua:117: in function 'draw'
    run.lua:136: in function 'draw'
    main.lua:148: in function 'draw'
    app.lua:42: in function <app.lua:22>
    [C]: in function 'xpcall'

  This is reproducible, and also across forks.
2023-06-01 12:30:19 -07:00
Kartik K. Agaram b1167675cf Merge capture.love 2023-04-03 09:20:47 -07:00
Kartik K. Agaram d28ba29d3c Merge lines.love 2023-04-03 09:19:58 -07:00
Kartik K. Agaram 282983d084 switch source side to new screen-line-based render
Also copy over the implementation of links from pensieve.love.
2023-04-03 08:33:07 -07:00
Kartik K. Agaram 5aa27f11b4 Merge capture.love 2023-04-01 23:30:35 -07:00
Kartik K. Agaram a0e0ba8d9f Merge lines.love 2023-04-01 23:30:27 -07:00
Kartik K. Agaram 876d6298b4 App.width can no longer take a Text
In the process I discovered the horrible fact that Text.x allocates a new Text.
And it gets called (just once, thank goodness) on every single frame.
2023-04-01 18:12:29 -07:00
Kartik K. Agaram 4ab901c92e get rid of to_text
I've been misunderstanding what Text objects are. They can render a lot
of text with a given line height, word wrap, colors in various places.
And I've been creating one for every word 🤦

Unwinding this will take some time. This is just a first baby step for
ad hoc text objects. Turns out I don't need to convert to Text to get
something's rendered width, just the Font can do that.

Thanks to the LÖVE Discord for educating me:
  https://discord.com/channels/329400828920070144/330089431379869708/1091535487333826580
2023-04-01 16:12:55 -07:00
Kartik K. Agaram 216dbf9916 Merge capture.love 2023-03-25 11:08:20 -07:00
Kartik K. Agaram 515f9cebf1 Merge lines.love 2023-03-25 11:03:58 -07:00
Kartik K. Agaram afadb4db66 stop reusing cursor locations between files 2023-03-25 10:37:55 -07:00
Kartik K. Agaram 0b1c47f79f experiment at avoiding some merge conflicts
https://merveilles.town/@akkartik/110084833821965708
2023-03-25 10:36:43 -07:00
Kartik K. Agaram 2787b4d8c3 Merge capture.love 2023-03-23 21:41:11 -07:00
Kartik K. Agaram a99e07633b Merge lines.love 2023-03-23 21:40:54 -07:00
Kartik K. Agaram a6dcfc5ac8 some minor cleanup
I can't see the mouse wheel ever setting dx, but it's more obvious now
that the editor doesn't support panning left/right.
2023-03-23 21:38:33 -07:00
Kartik K. Agaram 06581b06e4 Merge capture.love 2023-03-23 21:02:38 -07:00
Kartik K. Agaram 3361414364 Merge lines.love 2023-03-23 21:02:01 -07:00
Kartik K. Agaram 99faf61abb mouse wheel support 2023-03-23 21:00:09 -07:00
Kartik K. Agaram cd4c0fc52f Merge capture.love 2023-03-18 23:56:35 -07:00
Kartik K. Agaram d240bb8d9d Merge lines.love 2023-03-18 23:56:03 -07:00
Kartik K. Agaram 30e75991ce get typed in keystrokes to show on screen on iPad
Many thanks to Myte for helping test this!
2023-03-18 23:50:30 -07:00
Kartik K. Agaram e8d6a8a26d consistently use App names for methods everywhere 2023-03-18 23:45:01 -07:00
Kartik K. Agaram e2c1bbe4e5 more robust state validation 2023-03-17 10:28:10 -07:00
Kartik K. Agaram d25947baf2 Merge capture.love 2023-03-04 14:31:42 -08:00