diff options
author | Jesse Luehrs <doy@tozt.net> | 2021-11-19 12:38:59 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2021-11-19 12:39:33 -0500 |
commit | 073bcb868df8eea8504526f11bce9f831de06e67 (patch) | |
tree | 3e2dc3e23a78e2cfceabff445a75aaaa1636930a | |
parent | 4227bdedde837347ecd83510b976ab13d474b2b9 (diff) | |
download | vt100-rust-073bcb868df8eea8504526f11bce9f831de06e67.tar.gz vt100-rust-073bcb868df8eea8504526f11bce9f831de06e67.zip |
more line wrapping bugs
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | src/screen.rs | 2 | ||||
-rw-r--r-- | tests/data/fixtures/wrap.in | 1 | ||||
-rw-r--r-- | tests/data/fixtures/wrap/23.json | 3 | ||||
-rw-r--r-- | tests/data/fixtures/wrap/30.json | 18 | ||||
-rw-r--r-- | tests/data/fixtures/wrap/30.typescript | 1 |
6 files changed, 25 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index dc9a22a..0a0b2c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ the line * Fixed `Screen::cursor_state_formatted` to draw the last character in a line with the appropriate drawing attributes if it needs to redraw it +* Maintain wrapped state when overwriting a wide character at the end of a line ## [0.13.0] - 2021-11-17 diff --git a/src/screen.rs b/src/screen.rs index 57d1d1c..0c08881 100644 --- a/src/screen.rs +++ b/src/screen.rs @@ -915,7 +915,7 @@ impl Screen { col: drawing_pos.col + 1, }) .unwrap(); - next_cell.clear(attrs); + next_cell.set(' ', attrs); } let cell = self.current_cell_mut(); diff --git a/tests/data/fixtures/wrap.in b/tests/data/fixtures/wrap.in index 1c85cb2..491034d 100644 --- a/tests/data/fixtures/wrap.in +++ b/tests/data/fixtures/wrap.in @@ -27,3 +27,4 @@ a \x1b[H\x1b[@ \x1bc\x1b[1;80Haa\x1b[T\x1b[@ \x1bc\na\x1b[1;79Hデ\n +\x1bc\x1b[1;79Hネa\x1b[1;79Hb diff --git a/tests/data/fixtures/wrap/23.json b/tests/data/fixtures/wrap/23.json index 681554c..ef04d51 100644 --- a/tests/data/fixtures/wrap/23.json +++ b/tests/data/fixtures/wrap/23.json @@ -10,6 +10,9 @@ "1,0": { "contents": "d" }, + "1,1": { + "contents": " " + }, "1,2": { "contents": "a" } diff --git a/tests/data/fixtures/wrap/30.json b/tests/data/fixtures/wrap/30.json new file mode 100644 index 0000000..44351c6 --- /dev/null +++ b/tests/data/fixtures/wrap/30.json @@ -0,0 +1,18 @@ +{ + "contents": " b a", + "cells": { + "0,78": { + "contents": "b" + }, + "0,79": { + "contents": " " + }, + "1,0": { + "contents": "a" + } + }, + "cursor_position": [ + 0, + 79 + ] +}
\ No newline at end of file diff --git a/tests/data/fixtures/wrap/30.typescript b/tests/data/fixtures/wrap/30.typescript new file mode 100644 index 0000000..73ac4d4 --- /dev/null +++ b/tests/data/fixtures/wrap/30.typescript @@ -0,0 +1 @@ +c[1;79Hネa[1;79Hb
\ No newline at end of file |