From 4e4f47cb9a66eab13a40b2f7bf2477695c0ff003 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Fri, 3 Dec 2021 12:22:48 -0500 Subject: wide continuation cells should not have attributes it confuses things like cell insertion --- src/screen.rs | 2 +- tests/data/fixtures/ich_dch_ech.in | 1 + tests/data/fixtures/ich_dch_ech/15.json | 18 ++++++++++++++++++ tests/data/fixtures/ich_dch_ech/15.typescript | 1 + 4 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 tests/data/fixtures/ich_dch_ech/15.json create mode 100644 tests/data/fixtures/ich_dch_ech/15.typescript diff --git a/src/screen.rs b/src/screen.rs index 177a28e..2dba4b5 100644 --- a/src/screen.rs +++ b/src/screen.rs @@ -939,7 +939,7 @@ impl Screen { } } let next_cell = self.current_cell_mut(); - next_cell.clear(attrs); + next_cell.clear(crate::attrs::Attrs::default()); next_cell.set_wide_continuation(true); self.grid_mut().col_inc(1); } diff --git a/tests/data/fixtures/ich_dch_ech.in b/tests/data/fixtures/ich_dch_ech.in index ee7ec70..b152d5b 100644 --- a/tests/data/fixtures/ich_dch_ech.in +++ b/tests/data/fixtures/ich_dch_ech.in @@ -12,3 +12,4 @@ obar \x1b[1;80H \x1b[X \x1bc\x1b[1;78Hネab \x1b[H\x1b[@ +\x1bc\x1b[1mデ\x08\x1b[@ diff --git a/tests/data/fixtures/ich_dch_ech/15.json b/tests/data/fixtures/ich_dch_ech/15.json new file mode 100644 index 0000000..ec03132 --- /dev/null +++ b/tests/data/fixtures/ich_dch_ech/15.json @@ -0,0 +1,18 @@ +{ + "contents": "デ", + "cells": { + "0,0": { + "contents": "デ", + "is_wide": true, + "bold": true + }, + "0,1": { + "contents": "", + "is_wide_continuation": true + } + }, + "cursor_position": [ + 0, + 1 + ] +} \ No newline at end of file diff --git a/tests/data/fixtures/ich_dch_ech/15.typescript b/tests/data/fixtures/ich_dch_ech/15.typescript new file mode 100644 index 0000000..8c83609 --- /dev/null +++ b/tests/data/fixtures/ich_dch_ech/15.typescript @@ -0,0 +1 @@ +cデ[@ \ No newline at end of file -- cgit v1.2.3-54-g00ecf