about summary refs log tree commit diff stats
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* delete inapplicable issueKartik K. Agaram2023-04-211-4/+0
|
* correct a characterizationKartik K. Agaram2023-04-211-2/+2
|
* remove some support for long lines from source editorKartik K. Agaram2023-04-192-13/+7
| | | | | | | | | | | | A code editor is unlikely to need support for extremely long lines. And that kind of scroll is jarring anyway in a code editor. We don't read code like a novel, and less scroll per page implies more scrolling work. I'd gotten rid of this functionality and the test for it [1] back in the spokecone fork, but only took out the test when first pulling it into the source editor. [1] test_pagedown_often_shows_start_of_wrapping_line
* primitives for writing testsKartik K. Agaram2023-04-112-1/+28
|
* couple of typosKartik K. Agaram2023-04-111-4/+4
|
* editor documentationKartik K. Agaram2023-04-101-0/+49
|
* include a brief reference enabling many useful appsKartik K. Agaram2023-04-092-12/+264
|
* deemphasize the source editorKartik K. Agaram2023-04-093-3/+17
| | | | | | | | | This repo does not support freewheeling modification. It's a primitive to enable freewheeling modification in downstream forks. The source editor is a convenience, but it's a sharp tool and can easily leave the app in a broken state that requires dropping down to external tools (editor, file manager) to fix.
* rename a variableKartik K. Agaram2023-04-082-12/+11
|
* bugfix: syntax highlighting in source editorKartik K. Agaram2023-04-081-2/+7
| | | | | | | I missed that comments only get highlighted at start of line. This seems a bit hacky. But it continues to trade off CPU for reduced memory footprint.
* enhance bugfix of commit a9aa3436f (Dec 2024)Kartik K. Agaram2023-04-082-2/+2
| | | | | | | | | | | | Scenario: * start out with some text on screen * select some text A, delete * select some more text B, delete * press C-z twice to restore A and B * press C-y twice Before this commit only the first C-y was having an effect (deleting B). The second was failing to delete A.
* switch source side to new screen-line-based renderKartik K. Agaram2023-04-039-106/+115
| | | | Also copy over the implementation of links from pensieve.love.
* change cursor bounds check slightlyKartik K. Agaram2023-04-021-1/+1
| | | | | | This doesn't affect this fork directly, but it's a bad idea to assume the _app_ is always going to be doing just what a particular subsystem (here, the text editor in edit.lua+text.lua) is doing.
* streamline the interface for Text.drawKartik K. Agaram2023-04-022-3/+2
|
* avoid saving fragments in linesKartik K. Agaram2023-04-013-69/+48
| | | | | | | Now we render lines one screen line at a time rather than one word at a time. I can't port the source side just yet; I need to fix hyperlinks first..
* show count of test failuresKartik K. Agaram2023-04-011-1/+1
|
* minor cleanup and a todo for laterKartik K. Agaram2023-04-012-14/+4
|
* clean up some final bifold codeKartik K. Agaram2023-04-012-19/+3
|
* start thinking of compute_fragments as a detailKartik K. Agaram2023-04-012-2/+2
| | | | | | | | | | I think all we need to maintain is the populate_screen_line_starting_pos array. It's easy to render screen lines one by one from it, and we'll only ever construct one additional screen line at a time. I'd hoped to delete other calls to Text.populate_screen_line_starting_pos, but it turns out we need to update it when editing sometimes. Give up on that for now; it's a no-op if not needed.
* update documentation on fragmentsKartik K. Agaram2023-04-012-2/+2
| | | | | | I see a path to at least maintain a single fragment per screen line. But can we do better? It even seems unnecessary to maintain two copies of the data, chopped up into lines and screen lines.