about summary refs log tree commit diff stats
Commit message (Collapse)AuthorAgeFilesLines
...
* bugfix in source editorKartik K. Agaram2023-08-301-2/+8
| | | | We now need to explicitly select the directory we want to read from.
* cleaner API for file-system accessKartik K. Agaram2023-08-304-52/+535
| | | | | | | | | | | | | | | | | | | | | Thanks to physfs and nativefs.lua nativefs still introduces some inconsistencies with love.filesystem with relative paths: * love.fs.read: reads from save dir if it exists, falls back to source dir if not * nativefs.read: reads from save dir if it exists, falls back to source dir if not ✓ * love.fs.write: always writes to save dir * nativefs.write: always writes to source dir (since no restrictions) * love.fs.newFile followed by file:open('r'): reads from save dir if it exists, source dir if not * nativefs.newFile followed by file:open('r'): always reads from working dir * love.fs.newFile followed by file:open('w'): always writes to save dir * nativefs.newFile followed by file:open('w'): always writes to working dir So avoid using relative paths with App primitives.
* make a few names consistent with snake_caseKartik K. Agaram2023-08-304-20/+20
|
* reorganize app.lua and its commentsKartik K. Agaram2023-08-261-166/+142
| | | | | | I was so sure my comments were clear when I wrote this a year ago. They were shit. So, most probably, is the current iteration. Feedback appreciated.
* correct various names in this and other pre-freewheeling forksKartik K. Agaram2023-08-261-7/+7
|
* fix method name in documentationKartik K. Agaram2023-08-261-1/+1
|
* tweak wording in test listKartik K. Agaram2023-08-071-3/+2
|
* reorganize some commentsKartik K. Agaram2023-07-311-2/+2
| | | | | This keeps things consistent with other forks (links, lines-and-links) that are "conceptually upstream" of the source editor.
* bugfix: search highlight straddling screen linesKartik K. Agaram2023-07-312-14/+16
|
* remove a duplicate print to screenKartik K. Agaram2023-07-312-17/+14
| | | | In addition to being more efficient, this will simplify the next bugfix.
* extract a variableKartik K. Agaram2023-07-312-2/+4
|
* bugfix: highlight search patterns on the right lineKartik K. Agaram2023-07-312-4/+14
| | | | | | | | | | | | scenario: * position a wrapped line on screen * search for the word immediately after the point of wrapping Before this commit the word would be highlighted twice: - at the end of the first screen line - at the start of the second screen line Now it shows up at the right place.
* hoist and duplicate a conditionalKartik K. Agaram2023-07-312-6/+10
| | | | | | I'm duplicating the bounds check when drawing cursor and search highlight because they're separate concerns and require subtly different logic.
* improve a commentKartik K. Agaram2023-07-312-2/+2
|
* drop an unused argKartik K. Agaram2023-07-112-4/+4
|
* standardize between run and source some moreKartik K. Agaram2023-07-102-7/+3
| | | | | We shouldn't be thinking about saving settings when we're initializing window geometry.
* simplify saving settingsKartik K. Agaram2023-07-102-8/+2
| | | | We don't ever call one app's settings while Current_app is the other.
* bugfix: Windows pushing title bar off screenKartik K. Agaram2023-07-103-92/+32
| | | | | | | | | | | 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.
* delete flags that have never been exercisedKartik K. Agaram2023-07-102-8/+0
| | | | Initialization is getting complex, and I'm finding bugs.
* bugfix: preserve window positionKartik K. Agaram2023-07-101-1/+11
| | | | | | | | 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.
* bugfix: preserve window positionKartik K. Agaram2023-07-101-2/+7
|
* support for num padKartik K. Agaram2023-07-071-0/+37
| | | | It'll only work after LÖVE v12 comes out.
* experiment: convert to PijulKartik K. Agaram2023-06-251-0/+1
| | | | https://pijul.org
* stop highlighting strings in codeKartik K. Agaram2023-06-171-2/+3
| | | | | It works right so rarely that it's a net negative. I'll bring it back if I ever start tokenizing on non-whitespace.
* reconcile manual tests with some downstream forksKartik K. Agaram2023-06-081-1/+3
|
* several bugfixes in saving/loading cursor positionKartik K. Agaram2023-06-083-7/+24
|
* document some editor constantsKartik K. Agaram2023-06-071-0/+19
|
* return height of editor widget after drawingKartik K. Agaram2023-06-061-0/+2
|
* document facilities for buttons on screenKartik K. Agaram2023-06-061-0/+54
|
* document a couple of miscellaneous helpersKartik K. Agaram2023-06-051-0/+6
|
* document a few more keyboard primitivesKartik K. Agaram2023-06-051-0/+9
|
* rename modifier_down to key_downKartik K. Agaram2023-06-053-8/+7
| | | | The old name was confusing, as its description showed.
* port inscript's bugfix to source editorKartik K. Agaram2023-06-046-31/+143
|
* bugfix: inscript's bugKartik K. Agaram2023-06-044-16/+65
| | | | | | | | | | 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.
* handle wrapping linesKartik K. Agaram2023-06-032-2/+19
|
* change how we handle clicks above top marginKartik K. Agaram2023-06-034-24/+34
|
* desired behavior now looks goodKartik K. Agaram2023-06-021-0/+5
|
* save the list of tests in repoKartik K. Agaram2023-06-021-0/+113
|
* get rid of recent_mouseKartik K. Agaram2023-06-013-37/+24
| | | | | | | | | | | 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)
* failing test now looks realisticKartik K. Agaram2023-06-011-0/+46
|
* idea: set recent_mouse on mouse eventsKartik K. Agaram2023-06-012-4/+4
| | | | | 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
* ah, I see the problemKartik K. Agaram2023-06-012-13/+8
| | | | | | | 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.
* some temporary logging to catch a bugKartik K. Agaram2023-06-013-6/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* wait, fix testsKartik K. Agaram2023-05-301-9/+19
| | | | | We had this problem because our test fakes were out of sync with reality. And just in the source app.
* bugfix: drawings in source editorKartik K. Agaram2023-05-302-10/+20
| | | | | | | | | | | | | | | Broken since 2022-09 X-( Scenario: * switch to source editor * draw a line * wait 3 seconds Before this commit the app would crash and then fail to restart until you deleted the created .lua file from save dir. This is not the first time I've confused Lua's files and LÖVE's droppedFile objects. Just never rely on multiple args in file:write().
* hide cursor in log browser windowKartik K. Agaram2023-05-142-3/+3
|
* add an assertKartik K. Agaram2023-05-142-0/+2
| | | | | I added this to catch a rare bug. I've had it locally for a few weeks now without hitting it. Doesn't hurt to publish it.
* bugfix: rendering hyperlinks in wrapping linesKartik K. Agaram2023-05-141-1/+1
| | | | | | Scenario: a long line containing a hyperlink towards the end. Before this commit the underline for the hyperlink was being rendered on an x pixel starting from the start of the line.
* bugfix: searching files containing unicodeKartik K. Agaram2023-05-133-48/+62
| | | | | Before this change the cursor was moving, but not being highlighted properly when the cursor line contained unicode before the cursor.
* bugfix: never use utf8 pos in string.subKartik K. Agaram2023-05-063-4/+7
| | | | | | This is a violation of an existing rule in Manual_tests.md. The following command weakly suggests there aren't any others: grep ':sub(' *.lua |grep pos