diff options
Diffstat (limited to 'src/screen.rs')
-rw-r--r-- | src/screen.rs | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/src/screen.rs b/src/screen.rs index f8844aa..8bb8b0e 100644 --- a/src/screen.rs +++ b/src/screen.rs @@ -636,9 +636,13 @@ impl Screen { 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 (but if a wide character wraps because - // there was only one column left in the previous row, that should - // still count) + // 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 + // previous row - literally everything handles this case differently, + // and this is tmux behavior (and also the simplest). i'm open to + // reconsidering this behavior, but only with a really good reason + // (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 { let last_cell = self @@ -650,19 +654,6 @@ impl Screen { if last_cell.has_contents() || last_cell.is_wide_continuation() { wrap = true; } - if wrap_width > 1 { - let last_last_cell = self - .drawing_cell(crate::grid::Pos { - row: pos.row, - col: size.cols - 2, - }) - .unwrap(); - if last_last_cell.has_contents() - || last_last_cell.is_wide_continuation() - { - wrap = true; - } - } } self.grid_mut().col_wrap(wrap_width, wrap); |