Commit Graph

1407 Commits

Author SHA1 Message Date
Kartik K. Agaram 83b8664619 fix a bad merge 2023-08-31 07:23:45 -07:00
Kartik K. Agaram f2eb3b7302 Merge text0 2023-08-31 00:20:30 -07:00
Kartik K. Agaram 921e0fe2c7 Merge text.love 2023-08-31 00:19:45 -07:00
Kartik K. Agaram 5021298090 Merge lines.love 2023-08-31 00:13:43 -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 bdab8b1c7e Merge text0 2023-08-30 22:58:21 -07:00
Kartik K. Agaram 8439944681 Merge text.love 2023-08-30 22:55:27 -07:00
Kartik K. Agaram 1fc11feb28 Merge lines.love 2023-08-30 22:45:37 -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 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 1759c089d7 Merge text0 2023-08-26 16:16:21 -07:00
Kartik K. Agaram e7085e1e17 Merge text.love 2023-08-26 16:04:20 -07:00
Kartik K. Agaram e1fcd7c9c3 Merge lines.love 2023-08-26 15:47:27 -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 ffa8c4041a bugfix: bring back an accidentally deleted line
Caused by a bad merge in commit 5622e523c.

Thanks Myte#5310 on Discord.
2023-08-05 00:09:04 -07:00
Kartik K. Agaram 3865fd86cd delete an unused arg 2023-07-31 14:20:53 -07:00
Kartik K. Agaram 6a644f3e44 bugfix: render text in given fg color 2023-07-31 12:01:18 -07:00
Kartik K. Agaram 47dd4a6785 Merge text0 2023-07-31 11:08:52 -07:00
Kartik K. Agaram e8a90c616d Merge text.love 2023-07-31 10:59:28 -07:00
Kartik K. Agaram 3b88c6540d Merge lines.love 2023-07-31 10:26:19 -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 c7e26e656b ignore long (block) comments when selecting buffer name
I asked on the lua-l mailing list, and this seems like the cleanest
approach.
2023-07-25 15:36:11 -07:00
Kartik K. Agaram f23ed15fd9 avoid some unnecessary allocations
To find the first word we currently strip _all_ Lua comments. This is
really wasteful for large definitions. At least avoid all these
allocations if the first word is not a comment.
2023-07-24 00:44:34 -07:00
Kartik K. Agaram 5cac6d8584 handle messages that are all comment 2023-07-24 00:40:34 -07:00
Kartik K. Agaram d16eba699f don't tolerate Lua comments when parsing commands
We only care about Lua comments when the message doesn't start with a
command.
2023-07-24 00:28:24 -07:00
Kartik K. Agaram 6679c6e545 ignore comments when selecting buffer name 2023-07-23 22:32:36 -07:00
Kartik K. Agaram 5622e523c3 Merge text0 2023-07-11 11:15:46 -07:00
Kartik K. Agaram c3f8250cb2 Merge text.love 2023-07-11 11:11:48 -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 cc67c641dc Merge text0 2023-07-10 19:07:02 -07:00
Kartik K. Agaram f8930488aa Merge text.love 2023-07-10 18:41:23 -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 e68261d7a3 bugfix: preserve window position 2023-07-10 15:50:47 -07:00
Kartik K. Agaram 2f4e810f6d Merge text0 2023-07-07 18:57:30 -07:00