diff options
author | Jesse Luehrs <doy@tozt.net> | 2019-12-06 21:36:41 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2019-12-06 23:28:04 -0500 |
commit | e156958580d91b3244e4806ef1a6aa18e900a823 (patch) | |
tree | 214b9680e05940e6487600565bf431691d7a916d | |
parent | 2ffb815341c9c97568d4553745eda8e470f5c37a (diff) | |
download | vt100-rust-e156958580d91b3244e4806ef1a6aa18e900a823.tar.gz vt100-rust-e156958580d91b3244e4806ef1a6aa18e900a823.zip |
also move the wide char check inside the loop for ECH
-rw-r--r-- | src/grid.rs | 2 | ||||
-rw-r--r-- | tests/data/fixtures/ich_dch_ech.in | 1 | ||||
-rw-r--r-- | tests/data/fixtures/ich_dch_ech/12.json | 15 | ||||
-rw-r--r-- | tests/data/fixtures/ich_dch_ech/12.typescript | 1 |
4 files changed, 18 insertions, 1 deletions
diff --git a/src/grid.rs b/src/grid.rs index d4a8405..b29668f 100644 --- a/src/grid.rs +++ b/src/grid.rs @@ -473,8 +473,8 @@ impl Grid { let size = self.size; let pos = self.pos; let row = self.current_row_mut(); - row.clear_wide(pos.col); for col in pos.col..((pos.col + count).min(size.cols)) { + row.clear_wide(col); row.erase(col as usize, attrs); } } diff --git a/tests/data/fixtures/ich_dch_ech.in b/tests/data/fixtures/ich_dch_ech.in index b4f42dd..7d3c6f6 100644 --- a/tests/data/fixtures/ich_dch_ech.in +++ b/tests/data/fixtures/ich_dch_ech.in @@ -9,3 +9,4 @@ obar \x1b[10;11H\x1b[4X \x1b[10;11H\x1b[400X \x1b[1;80H \x1b[@ +\x1b[1;80H \x1b[X diff --git a/tests/data/fixtures/ich_dch_ech/12.json b/tests/data/fixtures/ich_dch_ech/12.json new file mode 100644 index 0000000..fc1e54f --- /dev/null +++ b/tests/data/fixtures/ich_dch_ech/12.json @@ -0,0 +1,15 @@ +{ + "contents": " \n\n\n\n\n\n\n\n\n f", + "cells": { + "0,79": { + "contents": " " + }, + "9,9": { + "contents": "f" + } + }, + "cursor_position": [ + 0, + 80 + ] +}
\ No newline at end of file diff --git a/tests/data/fixtures/ich_dch_ech/12.typescript b/tests/data/fixtures/ich_dch_ech/12.typescript new file mode 100644 index 0000000..55039e7 --- /dev/null +++ b/tests/data/fixtures/ich_dch_ech/12.typescript @@ -0,0 +1 @@ +[1;80H [X
\ No newline at end of file |