Kartik K. Agaram
53dc947868
Merge capture.love
2023-09-09 09:19:44 -07:00
Kartik K. Agaram
a5540b930c
Merge lines.love
2023-09-09 09:19:11 -07:00
Kartik K. Agaram
0016d668bc
two bugfixes
...
Annoying dangers of testing in one fork and committing upstream
(where it isn't used yet).
2023-09-09 09:09:14 -07:00
Kartik K. Agaram
09fbbbca5f
Merge capture.love
2023-09-09 09:03:52 -07:00
Kartik K. Agaram
455fe6e365
Merge lines.love
2023-09-09 09:03:32 -07:00
Kartik K. Agaram
bcd7f6b598
new primitives for reading/writing files
...
These are like versions in nativefs, but only support absolute paths.
I want to be thoughtful about the precise location at each call-site.
It's a little ugly that app.lua now has a dependency on file.lua. Or
source_file.lua for the source editor.
2023-09-09 08:56:21 -07:00
Kartik K. Agaram
31266e23f5
reorder
2023-09-09 08:27:27 -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
3dda5adac5
Merge lines.love
2023-09-08 14:34:02 -07:00
Kartik K. Agaram
87ea2af2da
a few more testable file-system operations
2023-09-08 14:03:40 -07:00
Kartik K. Agaram
6332be4a45
Merge capture.love
2023-09-04 15:17:47 -07:00
Kartik K. Agaram
5955319b05
Merge lines.love
2023-09-04 15:17:29 -07:00
Kartik K. Agaram
e74b92b733
show any error after switching to source editor
...
Error_message is a special global. It's set when the app (Current_app = 'run')
encounters an error and switches to the source editor, and cleared when
switching from source editor back to the app.
2023-09-04 15:07:54 -07:00
Kartik K. Agaram
2848d81424
Merge capture.love
2023-09-04 13:57:05 -07:00
Kartik K. Agaram
5f1840058c
Merge lines.love
2023-09-04 13:56:15 -07:00
Kartik K. Agaram
adfe94b9fc
switch to source editor on error
...
If we're already in source editor we'll quit as before.
It's ugly that app.lua now knows about run.lua. But it's a start.
2023-09-04 13:07:53 -07:00
Kartik K. Agaram
99495355b4
stop using keyboard.isDown
...
It doesn't work on Android, and it's not much work to avoid.
2023-09-04 00:22:31 -07:00
Kartik K. Agaram
119458ec43
Merge capture.love
2023-08-31 00:10:10 -07:00
Kartik K. Agaram
7c59409312
Merge lines.love
2023-08-31 00:09:44 -07:00
Kartik K. Agaram
6e54ad55d9
yet another set of bugfixes
...
The key API change I'd underestimated: opening a file used to return nil
on failure, and now returns false.
2023-08-30 23:52:25 -07:00
Kartik K. Agaram
da46b2e0fc
Merge capture.love
2023-08-30 22:39:30 -07:00
Kartik K. Agaram
492a10045c
Merge lines.love
2023-08-30 22:38:11 -07:00
Kartik K. Agaram
06ad5c4e8c
bugfix in source editor
...
We now need to explicitly select the directory we want to read from.
2023-08-30 22:30:20 -07:00
Kartik K. Agaram
7f36c991ed
Merge capture.love
2023-08-30 22:13:27 -07:00
Kartik K. Agaram
3651ab5b99
Merge lines.love
2023-08-30 22:11:42 -07:00
Kartik K. Agaram
f82c0de502
cleaner API for file-system access
...
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.
2023-08-30 19:04:06 -07:00
Kartik K. Agaram
7e97a2a1e7
make a few names consistent with snake_case
2023-08-30 06:44:54 -07:00
Kartik K. Agaram
061abb7d86
Merge capture.love
2023-08-26 15:36:29 -07:00
Kartik K. Agaram
e78554a2da
Merge lines.love
2023-08-26 15:31:22 -07:00
Kartik K. Agaram
ca4ad8a9e5
reorganize app.lua and its comments
...
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.
2023-08-26 15:15:42 -07:00
Kartik K. Agaram
9c38e505a5
correct various names in this and other pre-freewheeling forks
2023-08-26 13:15:32 -07:00
Kartik K. Agaram
d76541dec3
fix method name in documentation
2023-08-26 13:04:39 -07:00
Kartik K. Agaram
8603ca5d39
tweak wording in test list
2023-08-07 06:52:25 -07:00
Kartik K. Agaram
47d2ad78e1
Merge capture.love
2023-07-31 10:14:26 -07:00
Kartik K. Agaram
81fc24107c
Merge lines.love
2023-07-31 10:12:56 -07:00
Kartik K. Agaram
b93c0cd6cc
reorganize some comments
...
This keeps things consistent with other forks (links, lines-and-links)
that are "conceptually upstream" of the source editor.
2023-07-31 09:27:31 -07:00
Kartik K. Agaram
bb3e12eb5f
bugfix: search highlight straddling screen lines
2023-07-31 09:15:48 -07:00
Kartik K. Agaram
2b52383e18
remove a duplicate print to screen
...
In addition to being more efficient, this will simplify the next bugfix.
2023-07-31 08:56:20 -07:00
Kartik K. Agaram
8879fd6f29
extract a variable
2023-07-31 08:49:24 -07:00
Kartik K. Agaram
d6c06db97a
bugfix: highlight search patterns on the right line
...
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.
2023-07-31 08:40:22 -07:00
Kartik K. Agaram
f7f42b0bef
hoist and duplicate a conditional
...
I'm duplicating the bounds check when drawing cursor and search
highlight because they're separate concerns and require subtly different
logic.
2023-07-31 08:40:07 -07:00
Kartik K. Agaram
484b76f5c6
improve a comment
2023-07-31 08:21:38 -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