Commit Graph

259 Commits

Author SHA1 Message Date
Kartik K. Agaram cb99ac300c fix a failing test
I deployed this without even running it once :/ Production was broken
for 9 minutes until I rolled back.
2022-06-23 11:40:00 -07:00
Kartik K. Agaram 009c7abb60 extract a function 2022-06-23 11:09:49 -07:00
Kartik K. Agaram 5a06c1286d bugfix: recompute screen lines in backspace/delete
Scenario: backspacing until a line takes up fewer screen lines, then
pressing `down`.

I've gone through and checked that fragments and screen_line_starting_pos
are now cleared together everywhere.
2022-06-23 11:03:46 -07:00
Kartik K. Agaram 54eefbbf2d turns out super- chords to get to textinput 2022-06-22 17:37:26 -07:00
Kartik K. Agaram 8e68c699f5 bugfix: delete selection before pasting 2022-06-21 09:56:04 -07:00
Kartik K. Agaram 9c8285bf08 bugfix
State changes when inserting return are now in sync with other
characters.
2022-06-21 07:24:44 -07:00
Kartik K. Agaram 5a0b6c6a58 better fix for commit 3ffc2ed8f
I'm giving up finding a more generalized solution. The issue is that we
need the correct selection state right up to the point where we modify
Lines, in order to capture precise undo state.

Hopefully there aren't any other keychords that should clear the
selection.
2022-06-20 13:30:54 -07:00
Kartik K. Agaram 0d1e6aacd9 revert selection logic to before commit 3ffc2ed8f
We still have a failing test, but now it's the one we introduced in
commit 3ffc2ed8f.
2022-06-20 13:12:29 -07:00
Kartik K. Agaram c1b6bac187 much simpler
We just need to ensure textinput events never make use of selection
state.

All tests are passing, but I'm aware of a couple of issues. But now we
can keep all the special cases in one place.
2022-06-20 11:58:26 -07:00
Kartik K. Agaram 861c57b533 some early returns should be asserts 2022-06-20 11:51:07 -07:00
Kartik K. Agaram 809dae205d move Selection1 clearing past business logic
Now all the cases that clear Selection1 do so in a very consistent way
at the end of each case. And cases that set Selection1 symmetrically do
so at the start of each case.
2022-06-20 11:35:27 -07:00
Kartik K. Agaram d90617ee24 remove some redundant checks
Now all the cases manage Selection1 similarly.
2022-06-20 11:33:04 -07:00
Kartik K. Agaram 3986e99fe0 no, that's not right
Bugfix: we want selections to persist even when we lift up the shift
key.

This requires hoisting some code inside every case inside the whole
keypress hierarchy, to ensure we never clear selections before
textinput events can handle them.

Current cross-cutting concerns we're explicitly scattering code for.
  - autosave
  - undo
  - selection management
2022-06-20 11:31:14 -07:00
Kartik K. Agaram 3ffc2ed8f3 bugfix
To reproduce:
  click to position cursor at end of a line
  hit enter
  press any key

before:
  newline got erased and key got added to previous line

now:
  newline is preserved

The new test checks a generalization of this.
2022-06-19 09:21:32 -07:00
Kartik K. Agaram 703ed905c1 bugfix: crash in Text.up() after return
Let's just make all the utf8.offset calculations more defensive.
2022-06-19 09:06:41 -07:00
Kartik K. Agaram c15ee0b4a0 correct location of the line width slider 2022-06-18 00:03:19 -07:00
Kartik K. Agaram 856c51212a autosave slightly less aggressively
It might reduce wear and tear on disk, and losing 3 seconds of data
doesn't feel catastrophic (short of a C-z rampage).

Thanks to the love2d.org community for the suggestion:
  https://love2d.org/forums/viewtopic.php?f=14&t=93173
2022-06-17 15:43:31 -07:00
Kartik K. Agaram e3c7e9c96b extract variables for drawing padding 2022-06-14 10:49:10 -07:00
Kartik K. Agaram f277a78455 extract variable Margin_left 2022-06-14 10:49:06 -07:00
Kartik K. Agaram c1d8201d44 mouse buttons are integers, not strings
Not sure where that idiom comes from or why strings work in some places
(auto-coercion?). I picked it up off some example apps. But
https://love2d.org/wiki/love.mouse.isDown says it should be an integer.
2022-06-14 09:05:02 -07:00
Kartik K. Agaram e38bec4f46 go through and fix similar issues
All places where string.sub was being passed a _pos variable.
2022-06-14 08:15:51 -07:00
Kartik K. Agaram e20935ad7a bugfix
manifestation: clicking past end of a long, wrapping line containing
non-ASCII would cause the cursor to disappear rather than position past
end of screen line. Hitting enter would then throw an assertion with the
following stack trace:

  Error: text.lua:381: bad argument #2 to 'sub' (number expected, got nil)
  stack traceback:
    [love "boot.lua"]:345: in function <[love "boot.lua"]:341>
    [C]: in function 'sub'
    text.lua:381: in function 'insert_return'
    text.lua:179: in function 'keychord_pressed'
    main.lua:495: in function 'keychord_pressed'
    keychord.lua:10: in function <keychord.lua:5>
    app.lua:34: in function <app.lua:25>
    [C]: in function 'xpcall'

cause: the click caused a call to Text.to_pos_on_line whose result was
not on a UTF-8 character boundary.

fix: make to_pos_on_line utf8-aware.
2022-06-14 08:02:25 -07:00
Kartik K. Agaram 9b0577f79e bugfix: UTF-8 in compute_fragments 2022-06-14 08:01:53 -07:00
Kartik K. Agaram 059efba79d override mouse state lookups in tests
If I'd had this stuff in my test harness earlier, two recent commits
would have failed tests and given me early warning:
  ff88238ff1
  ff88a2a927
2022-06-12 09:04:21 -07:00
Kartik K. Agaram ff88238ff1 bugfix: BSOD in #4.
I messed up a function call in commit 391d764e13.
2022-06-11 20:54:17 -07:00
Kartik K. Agaram 391d764e13 stop handling nil screen_line_starting_pos everywhere
Things seem to be working..
2022-06-10 15:07:11 -07:00
Kartik K. Agaram e7787b979f this fixes the immediate regression 2022-06-10 14:52:49 -07:00
Kartik K. Agaram 0dd940024e stop repeatedly checking for line wrapping
We have a regression since we started reclaiming love Text fragments
more aggressively in commit 69c5d844cc. Pressing pageup no longer knows
about any line's screen lines. Not fixed yet.
2022-06-10 14:38:39 -07:00
Kartik K. Agaram c93553b670 . 2022-06-10 12:01:46 -07:00
Kartik K. Agaram fcacb6e63d extract scrolling logic out of insert_at_cursor 2022-06-10 11:29:01 -07:00
Kartik K. Agaram 31418976d4 extract scrolling logic out of insert_return 2022-06-10 11:21:41 -07:00
Kartik K. Agaram 69c5d844cc remove some memory leaks from rendered fragments
All signs so far seem to be that CPU is cheap for this application, but
memory is expensive. It's easy to get sluggish if the GC comes on.

After some experiments using https://github.com/yaukeywang/LuaMemorySnapshotDump,
one source of memory leaks is rendered fragments (https://love2d.org/wiki/Text
objects). I need to render text in approximately word-sized fragments to
mostly break lines more intelligently at word boundaries.

I've attached the files I used for my experiments (suffixed with a '.')

There's definitely still a leak in fragments. The longer I edit, the
more memory goes to them.
2022-06-10 11:16:41 -07:00
Kartik K. Agaram fe170fc579 experiment: blinking cursor
I've tried to keep the time period of the blinking similar to my
terminal.

Honestly I'm no longer sure if any of my experiments are showing a
statistically significant result. Let's see how it feels over a period
of time.
2022-06-09 13:47:41 -07:00
Kartik K. Agaram 25190676ea the problem is that the cursor can occlude text
And anything we do to reduce the occlusion also makes the cursor harder
to acquire.

I suppose this is why we need the blink.
2022-06-09 13:39:41 -07:00
Kartik K. Agaram 06fae39088 make the cursor a little thicker
I'm testing this by moving the cursor around with my eyes closed, then
starting a stopwatch as I open my eyes. This seems to help a bit. I'm
able to acquire the cursor in 2s. At least the 10s outliers I used to
have with the circle or thin line don't seem to be happening.
2022-06-09 13:26:49 -07:00
Kartik K. Agaram b418e60e6a experiment: line cursor 2022-06-09 13:20:05 -07:00
Kartik K. Agaram f7afc61b22 fix a crash
This one isn't worth debugging. We know how to recreate this data on
demand.
2022-06-06 18:57:46 -07:00
Kartik K. Agaram b1c7ebdca3 additional logging for an active bug 2022-06-05 12:04:21 -07:00
Kartik K. Agaram 9cafed99f4 another bugfix in scrolling while inserting text
I'm being unprincipled at the moment between pos and x,y coordinates.
Whatever is more convenient. Perhaps a cleaner approach will come to me
over time.
2022-06-05 10:08:28 -07:00
Kartik K. Agaram e7a985bd0a bugfix in previous commit
I almost pushed this to production. That would have been catastrophic;
the very first keystroke anyone typed into the editor would have failed.

And in the process, this fixes the next bug on my TODO list! Paste on
first line wasn't working. Now it is.
2022-06-05 09:51:54 -07:00
Kartik K. Agaram de473046bc check for scroll when just typing 2022-06-05 08:29:38 -07:00
Kartik K. Agaram 5055361209 rename 2022-06-05 08:11:50 -07:00
Kartik K. Agaram 3f07ac51d2 some unnecessary mutations
Why are we not modifying Screen_top1.pos in these places? Because we
don't really need to modify Screen_top1 at all.
2022-06-05 08:11:33 -07:00
Kartik K. Agaram 8c0f54ee64 some typos 2022-06-05 07:59:44 -07:00
Kartik K. Agaram 6267ddd2eb bugfix: backspace from start of file 2022-06-04 22:13:34 -07:00
Kartik K. Agaram 4c5ac9ae5e regression: couldn't do many drawing operations because line.y was reset 2022-06-04 20:52:36 -07:00
Kartik K. Agaram fa267e25e6 experiment: slightly adaptive scrolling
When long wrapping lines go past the current page, I find myself
scrolling before I get to the bottom. So let's scroll less, usually from
the start of the bottom-most line, even if it wraps multiple screen
lines.

The challenge with this is to ensure that a long line that fills the
whole page by itself doesn't get you stuck. I take some care to make
sure <pagedown> always makes forward progress.
2022-06-04 14:55:52 -07:00
Kartik K. Agaram 98f50f0b40 make cursor more obvious
Let's see if this is good enough. I can also bump up to 4px radius if I
need to.
2022-06-04 11:46:43 -07:00
Kartik K. Agaram e2696fcc72 more precise search highlighting 2022-06-03 14:37:32 -07:00
Kartik K. Agaram 1bdb931575 extract a function 2022-06-03 14:30:51 -07:00
Kartik K. Agaram 0d52962b3e extract a couple of files 2022-06-03 14:17:41 -07:00
Kartik K. Agaram 06e6ecdf8f bugfix: restore state after C-f (find) 2022-06-03 13:59:40 -07:00
Kartik K. Agaram b69801bdf1 highlight selection while dragging
Mouse stuff is pretty strenuous. For the first time I have to be careful
not to recompute too often. And I ran into a race condition for the
first time where resetting line.y within App.draw meant mouse clicks
were extremely unlikely to see line.y set.
2022-06-03 13:22:03 -07:00
Kartik K. Agaram 73cc12047e select text using mouse drag
Doesn't yet highlight while dragging.
2022-06-03 08:11:18 -07:00
Kartik K. Agaram 7301f3964c up arrow to search previous 2022-06-03 07:48:41 -07:00
Kartik K. Agaram 8047ab9b89 switch copy/paste to ctrl- hotkeys 2022-06-02 23:52:26 -07:00
Kartik K. Agaram dcdcd07902 switch undo/redo to ctrl- hotkeys 2022-06-02 23:48:35 -07:00
Kartik K. Agaram 0b63721bb0 extract a new variable 2022-06-02 23:40:20 -07:00
Kartik K. Agaram 9bbfc2be13 crisp font rendering 2022-06-02 23:36:07 -07:00
Kartik K. Agaram b94b007db5 find text 2022-06-02 22:53:34 -07:00
Kartik K. Agaram 63f59e7c2c scroll if necessary on paste 2022-06-02 19:28:38 -07:00
Kartik K. Agaram 15c54f4383 rename 2022-06-02 19:25:33 -07:00
Kartik K. Agaram 51f4f13ecc test harness now supports copy/paste 2022-06-02 18:52:49 -07:00
Kartik K. Agaram 283c4e5804 bugfix: pasting newlines 2022-06-02 18:35:18 -07:00
Kartik K. Agaram 4f76ea37d7 more efficient undo/redo
Now the bottleneck shifts to applying undo/redo in large files. But
things should be snappy if you don't use the sluggish feature.
2022-06-02 17:46:30 -07:00
Kartik K. Agaram 22817492a3 rename 2022-06-02 16:44:18 -07:00
Kartik K. Agaram 477216a051 this implementation undo load-tests quite poorly
Even a 10KB file gets sluggish within the first 1k characters inserted.

We're not running out of memory, we're just overloading Lua's GC.
2022-06-02 16:29:18 -07:00
Kartik K. Agaram 670886240f after much struggle, a brute-force undo
Incredibly inefficient, but I don't yet know how to efficiently encode
undo mutations that can span multiple lines.

There seems to be one bug related to creating new drawings; they're not
spawning events and undoing past drawing creation has some weird
artifacts. Redo seems to consistently work, though.
2022-06-02 15:45:25 -07:00
Kartik K. Agaram 819cb4b1cc avoid scrolling down if possible 2022-05-30 17:24:23 -07:00
Kartik K. Agaram b22bfe82db support non-text lines in Text.to2
Originally I was only using it on cursor line, but there's no reason
that has to be true in general.
2022-05-30 15:40:36 -07:00
Kartik K. Agaram 3b4dacaee8 regression: typing uppercase letters in text 2022-05-30 15:36:53 -07:00
Kartik K. Agaram 6aeb89386c . 2022-05-29 16:03:02 -07:00
Kartik K. Agaram f17f5a1192 cut/copy selected text to clipboard 2022-05-29 15:33:24 -07:00
Kartik K. Agaram 23e9be3e10 selecting text and deleting selections
I've written a few tests for delete_selection, but the way different
operations initialize the selection seems fairly standard and not worth
testing so far.
2022-05-29 08:12:47 -07:00
Kartik K. Agaram 524157fb8a bugfix for non-ASCII 2022-05-29 07:57:35 -07:00
Kartik K. Agaram b0bb105cbe extract a couple of methods 2022-05-28 23:11:53 -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 0fab1b499d paste in text with M-v 2022-05-26 20:40:50 -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 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 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 f1eba43ed3 yet another bugfix. But for how long? 2022-05-22 10:40:34 -07:00
Kartik K. Agaram 5b9d8337c1 up and down arrow now moving by screen line where possible
Drawings can't be drawn partially, which sometimes makes things jerky.
2022-05-21 23:02:08 -07:00
Kartik K. Agaram 84898ed43a bugfix: printing the first part of a line at the bottom made it seem non-wrapping
Still lots wrong here.
2022-05-21 22:32:43 -07:00
Kartik K. Agaram 96dfe4f669 cleaner 2022-05-21 21:08:21 -07:00
Kartik K. Agaram 1e63bf0e0a I feel confident now that page-down is working. 2022-05-21 20:52:44 -07:00
Kartik K. Agaram 6550a4c6d7 couple of TODOs 2022-05-21 16:42:22 -07:00
Kartik K. Agaram c0df6f86a4 beginning of a new approach to scroll+wrap
So far I've just changed how existing variables are organized, and put
some scaffolding in place for dealing with the new types. Next up:
rewriting the code for scrolling to something that feels more obviously
correct.
2022-05-21 16:42:22 -07:00
Kartik K. Agaram bb9e23a638 support for naming points
There's still an absence of affordance showing when you're in naming mode.
2022-05-21 14:03:06 -07:00
Kartik K. Agaram da250585c0 disable some debug prints
I'm still very much in the region where this is valuable sensor data.
This is a new domain.
2022-05-20 22:46:32 -07:00
Kartik K. Agaram 0773b986dd more precise height calculation when scrolling up as much as possible while keeping cursor on screen 2022-05-20 22:45:49 -07:00
Kartik K. Agaram e420245ee3 keep cursor on screen when pressing 'down' 2022-05-20 22:18:39 -07:00
Kartik K. Agaram e3dc4c330b rename 2022-05-20 22:17:47 -07:00
Kartik K. Agaram a3f72abbde reduce ambitions a bit: page up/down need not start screen from the middle of a line
But we still have work to do for cursor up/down.
2022-05-20 21:30:59 -07:00
Kartik K. Agaram 6b91c0688e first stab at equally hacky cursor down support 2022-05-20 20:33:30 -07:00
Kartik K. Agaram ec5706e1ea stop recomputing Cursor_x now that we're saving it 2022-05-20 20:32:55 -07:00
Kartik K. Agaram e223df41bc clearer comments 2022-05-20 20:32:00 -07:00
Kartik K. Agaram 7d9125b0b0 some more logging
Still lots of signs it's all messed up, but I can't be sure until I
bring all the other keyboard shortcuts in sync.

I just need a better data structure that simplifies the logic. Perhaps
talk in terms of screen lines. In which case:
  We'll need to convert lines to screen lines at some point.
  We'll need to fix up screen lines when inserting and deleting
  characters.
2022-05-20 18:16:13 -07:00
Kartik K. Agaram c28f6ba031 snapshot - no, that's all wrong
I've been only thinking about up arrow when cursor is at top of screen.
Hopefully this is better.
2022-05-20 16:56:04 -07:00
Kartik K. Agaram ce94f8bf79 another piece of support for line wrapping in cursor up 2022-05-20 15:19:43 -07:00
Kartik K. Agaram 7e6705a113 first stab at supporting wrapping in cursor up
Looks pretty clean.
2022-05-20 08:55:45 -07:00
Kartik K. Agaram 1c20d514f2 bugfix
I'd wrapped currx in two conditionals, and not noticed that it gets
reclaimed within the other.

The hint is clearly more work than it's worth. Just take it out.
2022-05-20 08:02:03 -07:00
Kartik K. Agaram 3ec8019cc0 new globals: draw partial screen line up top
I'm not setting these yet. Rendering seems to be working after manually
setting them.
2022-05-20 06:58:17 -07:00
Kartik K. Agaram 1573dd8425 start using some globals 2022-05-20 06:10:04 -07:00
Kartik K. Agaram bca0c1fab9 bugfix 2022-05-20 05:44:04 -07:00
Kartik K. Agaram 7fd3c92efe start remembering where the cursor is drawn in px
We'll start using this in cursor up/down motions.
2022-05-20 05:41:25 -07:00
Kartik K. Agaram 5f2ef2faaf extract a function 2022-05-20 05:40:42 -07:00
Kartik K. Agaram e223182ad5 move 2022-05-19 22:58:04 -07:00
Kartik K. Agaram d622043284 planning out cursor up/down over wrapped lines 2022-05-19 22:56:55 -07:00
Kartik K. Agaram a7c7fd6bce bugfix: cursor past end of screen line 2022-05-19 22:41:24 -07:00
Kartik K. Agaram e2b371ea37 bugfix: text past cursor was rendered red on wrapped lines 2022-05-19 22:41:03 -07:00
Kartik K. Agaram 2f8d727c0b bugfix: show cursor when past end of line 2022-05-19 22:35:26 -07:00
Kartik K. Agaram 7749e459a7 change text cursor shape 2022-05-19 22:34:28 -07:00
Kartik K. Agaram 8f85b29893 clicking to the right of a wrapped line 2022-05-19 22:26:15 -07:00
Kartik K. Agaram d4daac442b clicking now moves the cursor even on long, wrapped lines 2022-05-19 22:07:12 -07:00
Kartik K. Agaram 4fb4e0eb25 rename 2022-05-19 22:02:49 -07:00
Kartik K. Agaram 839d2df3ea bugfix
As usual, binary search is hard to get right. This time I was never
actually selecting between left and right when they were just one
character apart.
2022-05-19 21:53:08 -07:00
Kartik K. Agaram f7ff4dc9c2 eliminate assumptions that line length == size in bytes 2022-05-19 17:46:02 -07:00
Kartik K. Agaram a9398e499b snapshot: wrapping long lines at word boundaries
Still not working:
  clicking on text to move the cursor aborts
  up/down motions still move by logical lines rather than screen lines
2022-05-19 17:29:14 -07:00