Commit Graph

83 Commits

Author SHA1 Message Date
Kartik K. Agaram 1c09746cd7 Merge text.love 2023-12-29 14:32:12 -08:00
Kartik K. Agaram 6bd2086b51 Merge lines.love 2023-12-29 14:29:18 -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 dcbdc7956b Merge text.love 2023-10-28 00:58:26 -07:00
Kartik K. Agaram f737d63c69 Merge lines.love 2023-10-28 00:54:14 -07:00
Kartik K. Agaram aa9a0b0b15 use my name for a dir 2023-10-27 23:58:42 -07:00
Kartik K. Agaram a649511848 Merge text.love 2023-07-11 10:39:54 -07:00
Kartik K. Agaram f72fe2f172 Merge lines.love 2023-07-11 10:06:12 -07:00
Kartik K. Agaram 52ba030eaa drop an unused arg 2023-07-11 08:36:42 -07:00
Kartik K. Agaram e135ce65e4 Merge text.love 2023-07-10 18:31:12 -07:00
Kartik K. Agaram 8482be9472 Merge lines.love 2023-07-10 17:55:12 -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 0a4e96d589 Merge text.love 2023-06-08 01:13:50 -07:00
Kartik K. Agaram fdb2172843 Merge lines.love 2023-06-08 01:12:38 -07:00
Kartik K. Agaram 14c08f9bd9 several bugfixes in saving/loading cursor position 2023-06-08 01:02:54 -07:00
Kartik K. Agaram 0bfb361997 Merge text.love 2023-06-04 15:22:38 -07:00
Kartik K. Agaram bf2c2555d6 Merge lines.love 2023-06-04 15:11:24 -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 24f97b73d1 Merge text.love 2023-04-03 09:27:42 -07:00
Kartik K. Agaram e406fdae0d Merge lines.love 2023-04-03 09:23:28 -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 c55b956cea Merge text.love
Copy over the implementation of links from the lines-and-links fork.
2023-04-02 09:37:26 -07:00
Kartik K. Agaram 3547c18db6 Merge lines.love 2023-04-02 09:22:32 -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 b544e56ef9 Merge text.love 2023-03-25 12:47:44 -07:00
Kartik K. Agaram eba85af0e3 Merge lines.love 2023-03-25 12:44:19 -07:00
Kartik K. Agaram 419965f3e8 Merge text.love 2023-03-25 11:40:43 -07:00
Kartik K. Agaram 1bd2846ec2 Merge lines.love 2023-03-25 11:30:25 -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 5dbfdd335f Merge text.love 2023-03-23 21:44:22 -07:00
Kartik K. Agaram aa8994167f Merge lines.love 2023-03-23 21:43:26 -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 99faf61abb mouse wheel support 2023-03-23 21:00:09 -07:00
Kartik K. Agaram 8736b87f76 Merge text.love 2023-03-19 00:01:09 -07:00
Kartik K. Agaram ab09ec6387 Merge lines.love 2023-03-18 23:59:42 -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 61f9436696 Merge text.love 2023-03-17 11:12:29 -07:00
Kartik K. Agaram 4dbc097f83 Merge lines.love 2023-03-17 11:02:10 -07:00
Kartik K. Agaram e2c1bbe4e5 more robust state validation 2023-03-17 10:28:10 -07:00
Kartik K. Agaram 83404d1f7b Merge text.love 2023-01-16 10:24:32 -08:00
Kartik K. Agaram 36ec0b4b06 Merge lines.love 2023-01-16 09:57:06 -08:00
Kartik K. Agaram 0719fdeaaf hoist out some common settings 2023-01-16 09:48:06 -08:00