~akkartik/lines2.love

284dfe61 — Kartik K. Agaram 2 days ago main
don't always pop up keyboard on mobile devices

We don't want to do this during app initialization because other forks
might not start out with an editor on screen even if this one does.

We also don't want to perform side-effects like this within
edit.mouse_press.
2f51b693 — Kartik K. Agaram 4 days ago
streamline Readme
0bd43b93 — Kartik K. Agaram 4 days ago
simplify end of file check on right arrow
1c81f152 — Kartik K. Agaram 7 days ago
fine, I'll add a badge
ff04771b — Kartik K. Agaram 9 days ago
fix line wrap in a comment
64a4282f — Kartik K. Agaram 11 days ago
Merge branch 'yumaikas-experiment'

After using get_rect in edit.draw I grow more confident that this is a
better approach. The only drawback is that edit.up and
edit._up_whole_screen_lines need some extra work to fight the
abstraction of get_rect. But that feels like a net win.
reuse get_rect in edit.draw
6e17b2ea — Kartik K. Agaram 12 days ago
stale hack
df76d50d — Kartik K. Agaram 12 days ago
stale hack
3720f8a8 — Kartik K. Agaram 12 days ago
clean up an issue I feel confident about
6c71be2e — Kartik K. Agaram 12 days ago
clean up an issue I feel confident about
008ab3df — Kartik K. Agaram 12 days ago
rename
afff83fa — Kartik K. Agaram 12 days ago
rename
d75603da — Kartik K. Agaram 12 days ago
explicitly state when operations manage undo
2f2eeff1 — Kartik K. Agaram 12 days ago
explicitly state when operations manage undo
04ca57c3 — Kartik K. Agaram 12 days ago
make function arg lowercase

This might have introduced a bug. I _think_ I've checked for functions
without an `Editor` arg, but one may have slipped past. I don't know how
to be sure. (Not without tests :/)
95837a50 — Kartik K. Agaram 12 days ago
make function arg lowercase

This might have introduced a bug. I _think_ I've checked for functions
without an `Editor` arg, but one may have slipped past. I don't know how
to be sure. (Not without tests :/)
cd34c94a — Kartik K. Agaram 12 days ago
bugfix

scenario:
  start with an empty file, there's one line with a '+' button on it
  press the '+' to create a drawing in the top line
  press C-z to undo
  = before this commit, undo would create a weird intermediate state where there were two lines with '+' on them

scenario:
  type something into the first line, press enter to append a second line
  press the '+' on the second line to create a drawing
  press C-z to undo
  = crash

The root cause in both cases: we end up creating 2 undo events starting
from the same before snapshot: one inside the button handler, and a
second on mouse release.

This doesn't affect lines 1 because we had a separate variable called
current_drawing which protected the mouse release handler from
triggering.
5ce18bdf — Kartik K. Agaram 12 days ago
bugfix

scenario:
  start with an empty file, there's one line with a '+' button on it
  press the '+' to create a drawing in the top line
  press C-z to undo
  = before this commit, undo would create a weird intermediate state where there were two lines with '+' on them

scenario:
  type something into the first line, press enter to append a second line
  press the '+' on the second line to create a drawing
  press C-z to undo
  = crash

The root cause in both cases: we end up creating 2 undo events starting
from the same before snapshot: one inside the button handler, and a
second on mouse release.

This doesn't affect lines 1 because we had a separate variable called
current_drawing which protected the mouse release handler from
triggering.
73f5b963 — Kartik K. Agaram 12 days ago
bugfix

scenario:
* open a file with a drawing on the first line
* position cursor in the line below
* hit backspace

I _think_ this is the only place where I need to update screen_top
_before_ the scroll check (because screen_top switches mode and has
gotten corrupted).
Next