(linetest) fix off by one error This has been here for a while: the "move to column" escape code is supposed to be zero-based, but empirically that does not seem to be the case on the several terminal emulators I've tested. (i.e. col(0) and col(1) are equivalent operations.) We can remove the erroneous padding from the relative position we compute, pass it to "move to row and column," and it does what you would expect.
(deps) fix issue w/ compiling smolboi This is very strange: `smolboi` was able to be compiled when invoking `cargo build` at the workspace root, but not from within its own member root. The issue is that `AsyncReadExt` and `AsyncWriteExt` were not being resolved. To compound the strangeness: `rusct-analyzer` in my editor (a) did not show that `use` line as an error, and even helped auto-complete it. The issue, it turns out, is that in the latest version fo `futures-util` has these traits behind a feature flag. I am not sure why that feature flag seems to have no effect on the workspace root, but here we are.
remove erroneous lock files from workspace members
Merge branch 'feature/rustfmt-spaces'
(rust2018) (style) replace #[macro_use] for log crate
(style) add editorconfig file
(style) (rustfmt) run rustfmt on crate
(rust2018) recursion limit no longer needed?
(release) smolboi v0.1.1 * Merge branch 'feature/smol-1.0' * Create new single threaded executor * Update TCP acceptor task to use that executor * Update event broker task to use that executor * Use `smol::block_on` in runtime thread
(deps) update to smol 1.x
(bump version) update smolboi & linetest to rust 2021
(rustup) unlock dependencies for latest rustc
(repo) update readme to mention linetest crate
(repo) Release project under BSD license.
(ui/buffer): fix panic when using home/end keys Home needs to update the position of `end` to be consistent w/ the currently rendered span length, otherwise subtractions involving the end of the span will underflow. End likewise needs to update not just the cursor position, but also the start and end of the current span. Otherwise the cursor will be inserting text into a span that is rendered off-screen.
(net): add tests for client state machine - brings in `sluice` crate to create an in-memory bidirectional stream which we can use to model a fake TCP connection. - adds tests surrounding the initial client/server registration handshake.
(crate) use `Into` trait where possible removes `as` for infallible casts. a little gross in a few places where it requires additional `let` bindings because inference falls down. remaining casts are guarded w/ `assert!` as a means to declare my intent that these *should not* fail in practice, even though they might in some super future, where you have a 65636p display. ("This software doesn't work on my 65K display! D:" - what a nice problem that'd be to solve. lol.)
(ui): implement Home & End keys - (term) adds event handlers for `KeyCode::Home` and `KeyCode::End`. - (buffer) adds `goto_head` and `goto_tail` methods for `InputBuffer`.
(linetest/ui/buffer): reconcile interaction of resizing w/ pager logic. This commit implements some changes to the pager which allow it to track the line index which created the multiline span. We can use this information to determine which line is currently drawn at the top of the buffer's viewport. If the span at the top of the viewport is not the first line in the buffer then we allow the user to continue scrolling up. Likewise if the span at the bottom of the viewport is not the last line we allow them to scroll down. In the special case where the user resizes their terminal to display more rows _while at the top of the buffer_ we fill the new rows with additional lines from the buffer.
(linetest/net) fix issue w/ malformed packets - Currently malformed packets will termiante the decoder. The protocol is, at present, not robust enough to continue following loss of sync. This decision may be revisited later if the protocol ever grows some packet framing. - Added a `quit` channel to allow packet decoding task failure to cascade into the main event loop itself.