Commit Graph

1902 Commits

Author SHA1 Message Date
Kartik K. Agaram 7e97a2a1e7 make a few names consistent with snake_case 2023-08-30 06:44:54 -07:00
Kartik K. Agaram e53805c370 Merge pensieve.love 2023-08-26 15:46:16 -07:00
Kartik K. Agaram 776bfe1692 Merge lines.love 2023-08-26 15:44:06 -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 76ec6bd1f5 Merge pensieve.love 2023-08-02 14:28:31 -07:00
Kartik K. Agaram 881569fcf7 emphasize search/find features
Also deemphasize source editing, which has a lot of rough edges.
2023-08-02 14:27:34 -07:00
Kartik K. Agaram d3be518e69 Merge pensieve.love 2023-07-31 10:25:10 -07:00
Kartik K. Agaram 68df0db543 Merge lines.love 2023-07-31 10:18:43 -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 23faf85faa case-insensitive find (ASCII only) 2023-07-25 22:16:56 -07:00
Kartik K. Agaram 163e341051 add commands to navigate left/right by column
Being smart about the y coordinate is difficult, so they just bounce to
top of column for now. That way we're guaranteed the cursor pane will be
on screen.
2023-07-25 10:02:48 -07:00
Kartik K. Agaram 7df30d5187 Merge pensieve.love 2023-07-11 09:44:56 -07:00
Kartik K. Agaram e895517092 Merge lines.love 2023-07-11 09:41:00 -07:00
Kartik K. Agaram 52ba030eaa drop an unused arg 2023-07-11 08:36:42 -07:00
Kartik K. Agaram e701e4833b Merge pensieve.love 2023-07-10 18:02:01 -07:00
Kartik K. Agaram 7f1370721c Merge lines.love 2023-07-10 17:53:27 -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 a945a01121 Merge pensieve.love 2023-07-07 18:49:49 -07:00
Kartik K. Agaram 6ce6b1be8b Merge lines.love 2023-07-07 18:49:35 -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 0f5f6beccc Merge pensieve.love 2023-06-25 22:36:30 -07:00
Kartik K. Agaram 5a9136209d Merge lines.love 2023-06-25 22:30:58 -07:00
Kartik K. Agaram 33934337ab experiment: convert to Pijul
https://pijul.org
2023-06-25 06:12:36 -07:00
Kartik K. Agaram 58eb72d711 Merge pensieve.love 2023-06-17 10:47:32 -07:00
Kartik K. Agaram 195a5f3960 Merge lines.love 2023-06-17 10:47:23 -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 891eb58c94 Merge pensieve.love 2023-06-16 22:47:00 -07:00
Kartik K. Agaram 4d3997c917 grow recent column
I find myself having to search rather than C-f a few times lately. Most
recently the post I was looking for was 39 above. Pensieve has been
rock-solid lately, so it seems worth growing the window a bit. Let's
just go aggressively to 100, see how things look.
2023-06-16 22:45:36 -07:00
Kartik K. Agaram 03aa5192c9 Merge pensieve.love 2023-06-14 23:53:53 -07:00
Kartik K. Agaram 7fd1f0268f bugfix: page-up
Before this commit it was scrolling up too much. Like, 2 screens up
instead of 1.

This commit seems like a follow-up to commits dabb7a6c4 and a9a8d5c17.
I'm not analyzing it too much, just focusing on this location after some
debug logs.

Those commits should probably have noticed the missing symmetric
keystroke. But I'm probably ignoring similar concerns in dealing with
this so superficially.
2023-06-14 23:52:46 -07:00
Kartik K. Agaram 8133f2acb4 Merge pensieve.love 2023-06-10 17:44:20 -07:00
Kartik K. Agaram b7f2727b0e bugfix: screen_bottom1 might never be written
See previous commit.
2023-06-10 17:42:45 -07:00
Kartik K. Agaram 5ba9aa9e57 new bug: screen_bottom1 might never be written
Scenario: press C-f and search for something.
Some of the time we get a crash with this call stack:

  Error
  text.lua:970: attempt to compare nil with number

  Traceback
  [love "callbacks.lua"]:228: in function 'handler'
  text.lua:970: in function 'lt1'
  search.lua:72: in function 'search_next'
  run.lua:985: in function 'search_next_in_pane'
  run.lua:939: in function 'search_next'
  run.lua:784: in function 'text_input'
  main.lua:237: in function <main.lua:230>
  app.lua:31: in function <app.lua:22>
  [C]: in function 'xpcall'

Not fixed yet.

The cause: plan_draw is conservative and sometimes tries to render panes
that never overlap the viewport.

This bug was exacerbated by fixing the inscript bug which started
setting screen_bottom1 to nil. But the problem existed before as well,
we just operated on stale screen_bottom1 locations.

This bug doesn't generalize to many other scenarios. It isn't a problem
for forks without the surface metaphor, though it might affect
driver.love as well. Even in pensieve.love, the only place that uses
screen_bottom while spanning multiple editors is find across the entire
surface.
2023-06-10 17:34:48 -07:00
Kartik K. Agaram 262e8010f1 Merge pensieve.love 2023-06-08 01:24:24 -07:00
Kartik K. Agaram d686028bfe Merge lines.love 2023-06-08 01:23:59 -07:00
Kartik K. Agaram 1aceabc846 reconcile manual tests with some downstream forks 2023-06-08 01:21:33 -07:00