Commit Graph

1329 Commits

Author SHA1 Message Date
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 e68261d7a3 bugfix: preserve window position 2023-07-10 15:50:47 -07:00
Kartik K. Agaram b635ff5a01 Merge capture.love 2023-07-07 18:49:22 -07:00
Kartik K. Agaram cb158fe72c Merge lines.love 2023-07-07 18:49:10 -07:00
Kartik K. Agaram 9df1c3f997 support for num pad
It'll only work after LÖVE v12 comes out.
2023-07-07 18:40:12 -07:00
Kartik K. Agaram 45bb402c56 Merge capture.love 2023-06-25 22:30:05 -07:00
Kartik K. Agaram a1d4482239 Merge lines.love 2023-06-25 22:26:21 -07:00
Kartik K. Agaram 33934337ab experiment: convert to Pijul
https://pijul.org
2023-06-25 06:12:36 -07:00
Kartik K. Agaram 3d42c92ec4 Merge capture.love 2023-06-17 10:47:15 -07:00
Kartik K. Agaram a0bc23c98e Merge lines.love 2023-06-17 10:47:03 -07:00
Kartik K. Agaram 9ce9725bd6 stop highlighting strings in code
It works right so rarely that it's a net negative. I'll bring it back
if I ever start tokenizing on non-whitespace.
2023-06-17 10:41:50 -07:00
Kartik K. Agaram 56aa5c1773 Merge capture.love 2023-06-08 01:23:22 -07:00
Kartik K. Agaram 2b0a65ac27 Merge lines.love 2023-06-08 01:23:15 -07:00
Kartik K. Agaram 1aceabc846 reconcile manual tests with some downstream forks 2023-06-08 01:21:33 -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 d2a2b522bc Merge capture.love 2023-06-07 21:39:17 -07:00
Kartik K. Agaram f94a847058 Merge lines.love 2023-06-07 21:38:23 -07:00
Kartik K. Agaram 68eaba7d3d document some editor constants 2023-06-07 21:30:17 -07:00
Kartik K. Agaram 7340b51f4c Merge capture.love 2023-06-06 13:05:46 -07:00
Kartik K. Agaram 428e10e6e4 Merge lines.love 2023-06-06 13:05:39 -07:00
Kartik K. Agaram 96c056bd4c return height of editor widget after drawing 2023-06-06 12:52:44 -07:00
Kartik K. Agaram 090eebe2b7 Merge capture.love 2023-06-06 11:39:07 -07:00
Kartik K. Agaram 00e30010d4 Merge lines.love 2023-06-06 11:38:55 -07:00
Kartik K. Agaram 43114e2fa5 document facilities for buttons on screen 2023-06-06 11:18:20 -07:00
Kartik K. Agaram c9c02d4019 Merge capture.love 2023-06-05 22:34:43 -07:00
Kartik K. Agaram 389a76fcb1 Merge lines.love 2023-06-05 22:33:04 -07:00
Kartik K. Agaram f1981e85db document a couple of miscellaneous helpers 2023-06-05 22:23:25 -07:00
Kartik K. Agaram fc094496c1 document a few more keyboard primitives 2023-06-05 22:22:53 -07:00
Kartik K. Agaram 9e17337217 rename modifier_down to key_down
The old name was confusing, as its description showed.
2023-06-05 22:21:04 -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 637e28f300 port inscript's bugfix to source editor 2023-06-04 12:33:23 -07:00
Kartik K. Agaram 9656e13774 bugfix: inscript's bug
To fix this I have to first stop incrementally updating screen_bottom1
in the middle of a frame. Now it always has a good value from the end of
a frame.

I'm also running into some limitations in the test I'd ideally like to
write (that are documented in a comment), but I still get some sort of
automated test for this bugfix.
2023-06-04 12:20:24 -07:00
Kartik K. Agaram cf0ba7c154 handle wrapping lines 2023-06-03 10:44:11 -07:00
Kartik K. Agaram 3114176ebd change how we handle clicks above top margin 2023-06-03 10:36:05 -07:00
Kartik K. Agaram 541519a998 desired behavior now looks good 2023-06-02 07:46:45 -07:00
Kartik K. Agaram e0462ea2d8 save the list of tests in repo 2023-06-02 07:45:30 -07:00
Kartik K. Agaram cdef37c419 get rid of recent_mouse
It's a hack:
  - if you start selecting from below final line the start of the
    selection is the most recent click even if it was forever ago
  - (the crash we're currently fixing) if you start up and immediately
    select all then click below final line => crash. recent_mouse was
    never set.
  - getting rid of it breaks no tests (except the crash we're currently
    fixing)
2023-06-01 22:12:12 -07:00
Kartik K. Agaram 9b27a4d816 failing test now looks realistic 2023-06-01 21:59:09 -07:00
Kartik K. Agaram 9b3fa33f5b idea: set recent_mouse on mouse events
This helps, but doesn't address the C-a case. As it stands, literally my
first click of the mouse might need access to recent_mouse.line/pos
2023-06-01 21:58:28 -07:00
Kartik K. Agaram 3e848efb08 ah, I see the problem
Text.mouse_pos can sometimes set recent_mouse.time but not
recent_mouse.x/y. I'd assumed x/y is never nil in those situations, but
that's violated. It's most easily seen when typing C-a and then
clicking.
2023-06-01 12:37:17 -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 0b59560b03 Merge capture.love 2023-05-30 00:30:16 -07:00
Kartik K. Agaram 8f01fbb47f Merge lines.love 2023-05-30 00:29:49 -07:00
Kartik K. Agaram e568378ecb wait, fix tests
We had this problem because our test fakes were out of sync with reality.
And just in the source app.
2023-05-30 00:24:16 -07:00
Kartik K. Agaram da754b2b9c Merge capture.love 2023-05-30 00:13:22 -07:00