Kartik K. Agaram
b0bb105cbe
extract a couple of methods
2022-05-28 23:11:53 -07:00
Kartik K. Agaram
a6ab7a2c20
bugfix: include shift keys in modifier_down
2022-05-28 23:01:01 -07:00
Kartik K. Agaram
d58aabe867
extract a couple more methods
2022-05-28 22:45:53 -07:00
Kartik K. Agaram
86532eef4b
move some code
...
I had this idea originally to keep text.lua oblivious to drawings.
But that hasn't been true for some time. Losing battle.
2022-05-28 22:45:08 -07:00
Kartik K. Agaram
18c62fb146
extract a few methods
2022-05-28 22:38:35 -07:00
Kartik K. Agaram
e79c895c7d
move
2022-05-28 22:27:47 -07:00
Kartik K. Agaram
10c1a70dd0
.
2022-05-28 22:24:17 -07:00
Kartik K. Agaram
916e4ce341
scroll on backspace
2022-05-28 09:41:02 -07:00
Kartik K. Agaram
cf94d36a5f
.
2022-05-28 09:35:06 -07:00
Kartik K. Agaram
95592b83fb
.
2022-05-28 09:31:51 -07:00
Kartik K. Agaram
3266262b1f
fix a regression in line wrapping
2022-05-28 09:04:21 -07:00
Kartik K. Agaram
8a3b66c813
scroll on enter
2022-05-28 08:38:49 -07:00
Kartik K. Agaram
229e1514f2
.
2022-05-27 23:35:01 -07:00
Kartik K. Agaram
f4235a1741
tweak modifier keys to include 'shift'
2022-05-27 23:34:20 -07:00
Kartik K. Agaram
0fab1b499d
paste in text with M-v
2022-05-26 20:40:50 -07:00
Kartik K. Agaram
dd635546e3
.
2022-05-25 21:04:27 -07:00
Kartik K. Agaram
bce43b56b0
few more transitions between shapes
2022-05-25 17:07:19 -07:00
Kartik K. Agaram
f49e2fd104
typos
2022-05-25 17:07:06 -07:00
Kartik K. Agaram
d1f893a98e
M-left/M-right for word-based motions
2022-05-25 15:47:11 -07:00
Kartik K. Agaram
9892bc5d7c
extract couple of functions
2022-05-25 15:25:10 -07:00
Kartik K. Agaram
cb943b9aeb
couple of renames
2022-05-25 15:20:18 -07:00
Kartik K. Agaram
1fa295e599
keep repeated cursor up/down motions from drifting left
2022-05-25 15:08:53 -07:00
Kartik K. Agaram
815c4f010a
assert for a bug I saw a while ago but can no longer reproduce
...
I saw screen_top not at start of screen line, but at cursor location in
middle of line.
2022-05-25 15:00:13 -07:00
Kartik K. Agaram
34950353b9
bugfix: don't append metadata when it already exists
2022-05-25 14:56:21 -07:00
Kartik K. Agaram
fd213e6f49
bugfix
...
I spent 20 minutes converting a manual test to a reproducible automated
one, but in the process I knew exactly what the problem was. Nice.
2022-05-25 14:31:16 -07:00
Kartik K. Agaram
c2eee640cf
test and App helper for mouse clicks
2022-05-25 13:38:33 -07:00
Kartik K. Agaram
442133fe7f
no, make sure to compute line width after screen dimensions
2022-05-25 13:35:32 -07:00
Kartik K. Agaram
fa103ca2e8
couple more tests
...
Along with the App helpers needed for them.
2022-05-25 12:59:12 -07:00
Kartik K. Agaram
2999605530
bugfix: down arrow doesn't scroll up unnecessarily
...
up arrow doesn't seem to have the symmetric issue.
2022-05-24 15:03:06 -07:00
Kartik K. Agaram
84973b09e3
bugfix
...
Found while reading https://www.gutenberg.org/ebooks/52091
2022-05-24 14:34:58 -07:00
Kartik K. Agaram
e581a2b7d1
get rid of debug variables
2022-05-23 23:00:07 -07:00
Kartik K. Agaram
8d5ac5da75
keep one screen line of overlap on pagedown
...
I'm now extracting the concern of computing
line.screen_line_starting_pos out of Text.draw. Earlier
I had to make sure I ran through the whole line to compute
screen_line_starting_pos, but that had the side-effect of updating
Screen_bottom1.pos as well with lines that had never been rendered.
In this process I hit my first bug due to an accidental global. It
doesn't show up in the patch because I accidentally deleted a local
declaration. (I thought I didn't need screen_line_starting_pos anymore,
deleted everywhere, then brought it back everywhere from the bottom of
the function up, but forgot to put back the very first occurrence.)
The amount of yoyoing this caused between App.draw and Text.draw, I very
much have spaghetti on my hands.
Accidental globals are _terrible_ in a program with tests. Cross test
contamination X-(
2022-05-23 22:51:52 -07:00
Kartik K. Agaram
b3251b23b5
a few tests for pageup, and a bugfix
...
It wasn't screen-line aware. Now it is.
2022-05-23 20:57:56 -07:00
Kartik K. Agaram
6b093fe3b4
clean up test progress indicators
2022-05-23 17:40:44 -07:00
Kartik K. Agaram
a35b130f08
one bug I've repeatedly run into while testing with Moby Dick
...
https://www.hogbaysoftware.com/posts/moby-dick-workout
2022-05-23 17:39:00 -07:00
Kartik K. Agaram
288d8426f1
scrolling with up arrow
2022-05-23 16:36:26 -07:00
Kartik K. Agaram
6b10c94dd5
disable all debug prints
2022-05-23 15:38:42 -07:00
Kartik K. Agaram
8b5fdffd7d
quite the frustrating bugfix
2022-05-23 15:34:05 -07:00
Kartik K. Agaram
c9434e4f17
snapshot
...
Why the fuck is this so fucking hard?
2022-05-23 15:22:16 -07:00
Kartik K. Agaram
254ae7ad99
.
2022-05-23 13:18:34 -07:00
Kartik K. Agaram
4490c5034f
similar tests for cursor up
2022-05-23 11:02:37 -07:00
Kartik K. Agaram
e0b2c2dede
couple of tests for cursor down
2022-05-23 10:56:39 -07:00
Kartik K. Agaram
4f6a324975
bugfix: don't rely on Screen_bottom1 while scrolling
...
Setting up the test just right to test the thing I want to test was a
rube goldberg machine of constants.
2022-05-23 08:52:13 -07:00
Kartik K. Agaram
37f1313b16
first successful pagedown test, first bug found by test
...
I also really need to rethink how people debug my programs. My approach
of inserting and deleting print() takes a lot of commitment. I need my
old trace-based whitebox testing idea. However, in my past projects I
never did figure out a good framework for tweaking how verbose a trace
to emit.
Perhaps that's too many knobs. Perhaps we just need a way to run a
single test with the most verbose trace possible. Then it's just a
matter of having the trace tell a coherent story? But even if the trace
stays out of program output in that situation, it's still in the
programmer's face in the _code_. Ugh.
Current plan: ship program with maximum tests and zero commented-out
prints. If you want to debug, insert prints. This is better than
previous, text-mode, projects just by virtue of the stdout channel being
dedicated to debug stuff.
2022-05-23 08:17:40 -07:00
Kartik K. Agaram
46d4c4de10
first test!
2022-05-22 23:17:06 -07:00
Kartik K. Agaram
8aa72be226
fold variables for screen dimensions into the app framework
2022-05-22 18:45:21 -07:00
Kartik K. Agaram
5d0e0f70c4
one more implication
2022-05-22 18:32:08 -07:00
Kartik K. Agaram
f421e1daa5
basic test-enabled framework
...
Tests still have a lot of side-effects on the real screen. We'll
gradually clean those up.
2022-05-22 18:29:52 -07:00
Kartik K. Agaram
555726a87d
rename
2022-05-22 18:23:04 -07:00
Kartik K. Agaram
f1eba43ed3
yet another bugfix. But for how long?
2022-05-22 10:40:34 -07:00