diff options
author | Jesse Luehrs <doy@tozt.net> | 2019-12-06 23:50:21 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2019-12-06 23:50:21 -0500 |
commit | c4d890090e20a2c3b7c6eb03feb2f6e6033c9caf (patch) | |
tree | 6d281ca1e58318796c08a3cea847d9239c8d9ea6 | |
parent | e6b26a5f6ac8f79f0fd26da4fe285fa3c33da21c (diff) | |
download | vt100-rust-c4d890090e20a2c3b7c6eb03feb2f6e6033c9caf.tar.gz vt100-rust-c4d890090e20a2c3b7c6eb03feb2f6e6033c9caf.zip |
need to update pos after potentially wrapping
-rw-r--r-- | src/screen.rs | 1 | ||||
-rw-r--r-- | tests/data/fixtures/wide.in | 1 | ||||
-rw-r--r-- | tests/data/fixtures/wide/24.json | 25 | ||||
-rw-r--r-- | tests/data/fixtures/wide/24.typescript | 1 |
4 files changed, 28 insertions, 0 deletions
diff --git a/src/screen.rs b/src/screen.rs index 7141c07..c72f1dd 100644 --- a/src/screen.rs +++ b/src/screen.rs @@ -624,6 +624,7 @@ impl Screen { } } self.grid_mut().col_wrap(wrap_width, wrap); + let pos = self.grid().pos(); if width == 0 { if pos.col > 0 { diff --git a/tests/data/fixtures/wide.in b/tests/data/fixtures/wide.in index c4752b3..23ebced 100644 --- a/tests/data/fixtures/wide.in +++ b/tests/data/fixtures/wide.in @@ -21,3 +21,4 @@ aデbネ \x1bcデ\x08\x1b[X \x1bcデ\x08\x08\x1b[X \x1bcaデ\rb\u{301} +\x1bc\x1b[1;79Hデ\x08ネ diff --git a/tests/data/fixtures/wide/24.json b/tests/data/fixtures/wide/24.json new file mode 100644 index 0000000..23a61c7 --- /dev/null +++ b/tests/data/fixtures/wide/24.json @@ -0,0 +1,25 @@ +{ + "contents": " デネ", + "cells": { + "0,78": { + "contents": "デ", + "is_wide": true + }, + "0,79": { + "contents": "", + "is_wide_continuation": true + }, + "1,0": { + "contents": "ネ", + "is_wide": true + }, + "1,1": { + "contents": "", + "is_wide_continuation": true + } + }, + "cursor_position": [ + 1, + 2 + ] +}
\ No newline at end of file diff --git a/tests/data/fixtures/wide/24.typescript b/tests/data/fixtures/wide/24.typescript new file mode 100644 index 0000000..29bb251 --- /dev/null +++ b/tests/data/fixtures/wide/24.typescript @@ -0,0 +1 @@ +c[1;79Hデネ
\ No newline at end of file |