diff options
author | Jesse Luehrs <doy@tozt.net> | 2019-11-05 12:53:25 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2019-11-05 13:26:49 -0500 |
commit | 2e7f1686d719497d9b2d2d2c8ffba20e6c8214bd (patch) | |
tree | 8f31cb37faaec73bdf4a5253f0c34bceb3cc6d6f /tests/split-escapes.rs | |
parent | e12f9d9ee4e6b902436d0282e4a1e47ed7d54d6c (diff) | |
download | vt100-rust-2e7f1686d719497d9b2d2d2c8ffba20e6c8214bd.tar.gz vt100-rust-2e7f1686d719497d9b2d2d2c8ffba20e6c8214bd.zip |
adjust the way window contents are reported
contents and contents_formatted now only allow getting the entire
terminal contents, and for any other uses we now provide rows and
rows_formatted.
the reasoning here is that it wasn't particularly useful to return
newline (or crlf) separated lines when not drawing the full terminal,
since it's not like you can send those to the terminal in any meaningful
way anyway (like, if you wanted to draw a subset of the terminal state,
you'll almost certainly need to be doing explicit positioning on your
own, since crlf is only actually correct if you're drawing the screen
subset in the upper left hand corner of the screen). with this, you can
draw each (subset of a) line individually, and reposition the cursor in
whatever way makes sense in between drawing the lines.
Diffstat (limited to 'tests/split-escapes.rs')
-rw-r--r-- | tests/split-escapes.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/split-escapes.rs b/tests/split-escapes.rs index 157ff29..6339c07 100644 --- a/tests/split-escapes.rs +++ b/tests/split-escapes.rs @@ -13,8 +13,8 @@ fn write_to_parser(chunks: &mut Vec<Vec<u8>>) -> (String, Vec<u8>) { parser.process(&chunk); } ( - parser.screen().contents(0, 0, 36, 192), - parser.screen().contents_formatted(0, 0, 36, 192), + parser.screen().contents(), + parser.screen().contents_formatted(), ) } |