aboutsummaryrefslogtreecommitdiffstats
path: root/src/screen.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2021-11-19 01:46:16 -0500
committerJesse Luehrs <doy@tozt.net>2021-11-19 01:47:47 -0500
commit1cd72ddb88037d25c5b31dc0fb634ab79dc0491d (patch)
treead8d512f52559e7f1f34aca43e6e439ece36cb53 /src/screen.rs
parentf973230cb32cf8a397f2456950e1463104e65101 (diff)
downloadvt100-rust-1cd72ddb88037d25c5b31dc0fb634ab79dc0491d.tar.gz
vt100-rust-1cd72ddb88037d25c5b31dc0fb634ab79dc0491d.zip
remove special casing for combined character wrapping
the comment here is just... not true? not really sure why i thought it was, but testing on all of alacritty, xterm, and tmux show the opposite behavior to what is in the comment, so i'm going to assume this is just wrong
Diffstat (limited to 'src/screen.rs')
-rw-r--r--src/screen.rs15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/screen.rs b/src/screen.rs
index e3581b9..56bd963 100644
--- a/src/screen.rs
+++ b/src/screen.rs
@@ -807,17 +807,6 @@ impl Screen {
let width = c.width().unwrap_or(0).try_into().unwrap();
- // zero width characters still cause the cursor to wrap - this doesn't
- // affect which cell they go into (the "previous cell" for both (row,
- // max_col + 1) and (row + 1, 0) is (row, max_col)), but does affect
- // further movement afterwards - writing an `a` at (row, max_col)
- // followed by a crlf puts the cursor at (row + 1,
- // 0), but writing a `à` (specifically `a` followed by a combining
- // grave accent - the normalized U+00E0 "latin small letter a with
- // grave" behaves the same as `a`) at (row, max_col) followed by a
- // crlf puts the cursor at (row + 2, 0)
- let wrap_width = if width == 0 { 1 } else { width };
-
// it doesn't make any sense to wrap if the last column in a row
// didn't already have contents. don't try to handle the case where a
// character wraps because there was only one column left in the
@@ -827,7 +816,7 @@ impl Screen {
// (xterm handles this by introducing the concept of triple width
// cells, which i really don't want to do).
let mut wrap = false;
- if pos.col > size.cols - wrap_width {
+ if pos.col > size.cols - width {
let last_cell = self
.drawing_cell(crate::grid::Pos {
row: pos.row,
@@ -838,7 +827,7 @@ impl Screen {
wrap = true;
}
}
- self.grid_mut().col_wrap(wrap_width, wrap);
+ self.grid_mut().col_wrap(width, wrap);
let pos = self.grid().pos();
if width == 0 {