about summary refs log tree commit diff stats
path: root/edit
Commit message (Collapse)AuthorAgeFilesLines
* 3914Kartik K. Agaram2017-06-161-8/+8
| | | | Remember that `before-previous-line` deals with wrapped screen lines.
* 3913Kartik K. Agaram2017-06-151-2/+45
| | | | Bugfix in ctrl-u.
* 3911Kartik K. Agaram2017-06-151-19/+3
|
* 3904Kartik K. Agaram2017-06-092-6/+6
| | | | Standardize functions to put the main object being modified first.
* 3903 - minimal render when pressing 'tab'Kartik K. Agaram2017-06-091-15/+39
| | | | Turns out all I had to do was reset `go-render?` to false.
* 3902 - drop redundant redraw of recipe side on F4Kartik K. Agaram2017-06-098-13/+52
| | | | | | This change is interesting because I only updated one test to gain confidence that F4 will never redraw the recipe side. (Most of the changes are to explicitly render-all before each scenario.)
* 3897 - various updates to documentationKartik K. Agaram2017-05-291-0/+18
|
* 3894 - comment/uncomment lines in edit appKartik K. Agaram2017-05-291-3/+111
|
* 3892Kartik K. Agaram2017-05-291-4/+4
| | | | Fix a keyboard shortcut conflict in commit 3884.
* 3891Kartik K. Agaram2017-05-291-10/+10
|
* 3886Kartik K. Agaram2017-05-281-5/+5
|
* 3885Kartik K. Agaram2017-05-281-0/+21
|
* 3884 - per-line scroll in edit/ appKartik K. Agaram2017-05-282-0/+63
|
* 3881 - allow students to turn sandboxes into recipesKartik K. Agaram2017-05-277-92/+210
| | | | Thanks Juan Crispin Hernandez for the suggestion.
* 3880Kartik K. Agaram2017-05-271-16/+1
|
* 3879Kartik K. Agaram2017-05-261-3/+3
|
* 3871Kartik K. Agaram2017-05-201-6/+0
| | | | | | | | Strange race condition: if I repeatedly press <enter> and <backspace> so the screen is constantly playing catch up, it will sometimes fail these assertions when it does eventually catch up. Somehow the cursor ends up misplaced. Let's just take them out. It's likely some low-level implementation detail of the terminal.
* 3870 - seldom draw both sides of edit/Kartik K. Agaram2017-05-201-7/+14
|
* 3869Kartik K. Agaram2017-05-192-100/+99
| | | | Clean up a few superficial things in Caleb's commit.
* 3868 - make ctrl-k and ctrl-u fasterCaleb Couch2017-05-201-2/+131
|
* 3866Kartik K. Agaram2017-05-191-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Yet another bugfix, this time in just the sandbox/ app: open sandbox/ with empty lesson/ directory type 'a' press backspace cursor was not moving left Now fixed. Turns out the sandbox/ app hadn't been working right since commit 3854. (Which ironically was a revert but clearly didn't revert enough; the last truly good commit was 3823, and we're still clawing our way back to the sunlight.) The issue in this case was that commit 3853 disabled update-cursor in some situations when it shouldn't have. To be safe, just always update-cursor one very event. I should probably reorganize this in edit/ as well, but it's not necessary for this particular bug. --- Incidentally, as part of my git bisecting I realized that the bug fixed in the trace browser as part of commit 3862 was very old: press '/' press some key press ctrl-u to erase press some key = out of bounds string access
* 3865Kartik K. Agaram2017-05-192-2/+0
|
* 3861 - screen untouched when entering console modeKartik K. Agaram2017-05-184-0/+4
|
* 3860 - stop buffering the screen in termboxKartik K. Agaram2017-05-189-21/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To achieve this we have to switch to a model of the screen in termbox that is closer to the underlying terminal. Before: a screen is a grid of characters writing out of bounds does nothing After: a screen is a scrolling raster of characters writing out of bounds wraps to next line and scrolls if necessary To move to the new model, it was essential that I migrate my fake screen at the same time to mimic it. This is why the first attempt (commit 3824) failed (commit 3858). This is also why this commit can't be split into smaller pieces. The fake screen now 'scrolls' by rotating screen lines from top to bottom. There's still no notion of a scrollback buffer. The newer model is richer; it permits repl-like apps that upstream termbox can't do easily. It also permits us to simply use `printf` or `cout` to write to the screen, and everything mostly works as you would expect. Exceptions: a) '\n' won't do what you expect. You need to explicitly print both '\n' and '\r'. b) backspace won't do what you expect. It only moves the cursor back, without erasing the previous character. It does not wrap. Both behaviors exactly mimic my existing terminal's emulation of vt100. The catch: it's easy to accidentally scroll in apps. Out-of-bounds prints didn't matter before, but they're bugs now. To help track them down, use the `save-top-idx`, `assert-no-scroll` pair of helpers. An important trick is to wrap the cursor before rather after printing a character. Otherwise we end up scrolling every time we print to the bottom-right character. This means that the cursor position can be invalid at the start of a print, and we need to handle that. In the process we also lose the ability to hide and show the screen. We have to show the prints happening. Seems apt for a "white-box" platform like Mu.
* 3859Kartik K. Agaram2017-05-131-0/+1
|
* 3857Kartik K. Agaram2017-05-131-12/+0
|
* 3856Kartik K. Agaram2017-05-131-0/+1
| | | | | Bugfix on commit 3853: clear `render-all-on-no-more-events` once you've actually run the `render-all`.
* 3854Kartik K. Agaram2017-05-139-42/+35
| | | | Revert commits 3824, 3850 and 3852. We'll redo them more carefully.
* 3853Kartik K. Agaram2017-05-121-4/+13
| | | | | | Bring back commit 3844, albeit in simplified form. I'd forgotten that the one place where we still need to buffer rendering is when people hold down up/down arrow keys.
* 3850Kartik K. Agaram2017-05-103-2/+42
| | | | | Bugfix: writes out of bounds used to be skipped, but started clobbering the screen on commit 3824.
* 3844Kartik K. Agaram2017-05-061-58/+5
| | | | | Once I start optimizing most events to not repaint everything there's no need to be smart about queued-up events.
* 3843Kartik K. Agaram2017-05-062-11/+17
|
* 3831Kartik K. Agaram2017-04-181-1/+1
| | | | Fix CI.
* 3824 - experiment: stop buffering in termboxKartik K. Agaram2017-04-168-35/+6
| | | | | | | | | | | | | | | | Now it's much more apparent why things are slow. You can see each repaint happening. Already I fixed one performance bug -- in clear-rest-of-screen. Since this subverts Mu's fake screen there may be bugs. Another salubrious side effect: I've finally internalized that switching to raw mode doesn't have to clear the screen. That was just an artifact of how termbox abstracted operations. Now I can conceive of using termbox to build a repl as well. (I was inspired to poke into termbox internals by http://viewsourcecode.org/snaptoken/kilo and https://github.com/antirez/linenoise)
* 3816Kartik K. Agaram2017-04-061-12/+2
| | | | | | | | Resize events don't actually seem to ever get queued up, so they're still super slow. Dump all our extra smarts about skipping repaints. We need to focus on speeding up repaints in general. Thanks Andrew Owen for reporting this issue.
* 3806Kartik K. Agaram2017-03-211-9/+4
|
* 3797Kartik K. Agaram2017-03-152-2/+0
|
* 3796Kartik K. Agaram2017-03-141-26/+45
| | | | | | Standardize the order of some common blocks in `render`, `render-text` and `render-code`. This is preparation for trying to reorganize them to reduce duplicate code.
* 3794Kartik K. Agaram2017-03-141-2/+2
| | | | Fix a _very_ misleading comment.
* 3793Kartik K. Agaram2017-03-142-63/+63
| | | | | | Move 'render-code' to the layer where it's used. Thanks Caleb Couch for finding this bit of ugliness.
* 3790Kartik K. Agaram2017-03-121-1/+4
| | | | Don't try to snapshot in scenarios.
* 3789Kartik K. Agaram2017-03-121-1/+3
| | | | | | | | | | | | | I accidentally got rid of git snapshotting of lessons back when I switched to testable file primitives last December (commit 3705). >:-( Bringing it back now, hopefully better. The improvement is that there's now at most one commit every time we hit F4. This change adds yet another reason that running `mu` from a different directory is just not supported.
* 3748Kartik K. Agaram2017-02-281-1/+1
|
* 3745Kartik K. Agaram2017-02-0710-0/+0
| | | | | | | Stop trying to create a new layer showing how we minimize prints. Stephen's suggestion is to create a data structure that encapsulates instructions to `insert-at-cursor` for either just printing a character to screen or rendering everything. Let's try that at some point.
* 3738 - start on new edit/ layer: minimizing printsKartik K. Agaram2017-02-0410-0/+0
|
* 3735 - get rid of 'print-integer'Kartik K. Agaram2017-01-222-5/+5
| | | | | We do support printing non-integer numbers for some time, albeit using the underlying host platform.
* 3733Kartik K. Agaram2017-01-111-1/+1
|
* 3731Kartik K. Agaram2017-01-111-1/+2
| | | | Bitrot in main when loading just layer 1 of the edit/ and sandbox/ apps.
* 3706Kartik K. Agaram2016-12-111-2/+2
|
* 3705 - switch to tested file-system primitivesKartik K. Agaram2016-12-118-462/+543
|