| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
This bit of code is complex enough now that I'm bothered I can't write
tests for has-more-events?
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This seemingly simple goal uncovered a little nest of bugs: it turns out
I've been awash in ambiguous labels until now. My baseline recipes in
edit.mu were clean, but they introduced duplicate <waypoints> -- and
*those* waypoints contained +jump-targets. Result: duplicate jump
targets, so that I wasn't jumping where I thought I was jumping. Somehow
I happened to be picking one of the alternatives that magically kept
these issues quiescent.
My first plan to fix this was to mangle names of all labels inside
before/after fragments, keep the jump targets private to their fragment.
But the labels also include more waypoints! Mangle those, and I can't
tangle to them anymore.
Solution: harden the convention that jump targets begin with '+' and
waypoints are surrounded by '<>'. Mangle jump targets occurring inside
before/after fragments to keep them private to their lexical fragment,
but *don't* mangle waypoints, which must remain globally accessible.
|
| |
|
|
|
|
| |
Tangle points aren't unique within a recipe and cannot be jumped to.
|
|
|
|
|
|
| |
I'm starting to feel the need for separating labels to jump to (so must
be unique per recipe) from labels you can tangle at (need not be
unique). Maybe just use a sigil different from '+'?
|
|
|
|
|
| |
I ran into this inside 'reload' when I left a trailing comment at the
end of the editor.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
For some reason porting the termbox-go implementation was still leaving
some gunk from git on screen when I ran my usual test:
$ mkdir lesson; cd lesson; git init; mu edit.mu
Then hit F4, generating messages from git on the initial commit.
Then hit ctrl-l to clear all git gunk.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This is really testing our premise that mu is robust to duplication. The
new routine diverges from the old in only 1 out of 68 lines.. and also
has no tests.
|
| |
|
|
|
|
|
| |
We don't want to add duplicate fields to the container everytime we hit
F4.
|
|
|
|
| |
Make a test more robust, especially when running just until layer 38.
|
| |
|
| |
|
|
|
|
| |
Still to go: ctrl-k and ctrl-u.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Merging in unnecessary '0/empty' fields was a pain, and also made me do
some additional debugging in the last commit.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mu still isn't so optimized that I can be profligate with spare cycles.
Instead we'll follow termbox-go's example and create a new API routine
called tb_sync() (after discussion with termbox's author). Now we only
need use tb_sync() on ctrl-l. For everything else use the optimized
render.
Now I think I've eradicated all signs of "cursor thrashing" during
refresh, in spite of how slow mu is as an interpreted language. We only
render the whole screen in some situations, and only if there's no more
input, and even then we only refresh the parts of the screen that
changed.
Thanks Jack and Caleb Couch for providing the impetus behind commits
2109-2113.
I've been lazy about writing tests for all this, but it's still good to
know I could, if I wanted to.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
We're still seeing mu hang for long periods if people press and hold say
an arrow key, as the events are all processed. Hopefully this will stop
that from taking too long.
But the real problem is still printing junk to screen because of
sluggishness in processing input.
|
|
|
|
| |
Test-only routines like 'editor-event-loop' are a pox.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
I'm sick of using the 'replace-in-console' hack.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
One drawback of my approach: if you move the cursor you lose your redo.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Finally terminate the experiment of keeping debug prints around. I'm
also going to give up on maintaining counts.
What we really need is two kinds of tracing:
a) For tests, just the domain-specific facts, organized by labels.
b) For debugging, just transient dumps to stdout.
b) only works if stdout is clean by default.
Hmm, I think this means 'stash' should be the transient kind of trace.
|
| |
|
| |
|
| |
|
| |
|
| |
|