From 3fbc74f513a5a691dd99705598c3023f3b8bc173 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Fri, 29 Nov 2019 04:40:39 -0500 Subject: handle wide char wrapping correctly wrapping a wide char should set the wrapping state of the line even if it wrapped before the last column --- tests/text.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/text.rs') diff --git a/tests/text.rs b/tests/text.rs index 51ee297..d153f11 100644 --- a/tests/text.rs +++ b/tests/text.rs @@ -226,6 +226,10 @@ fn wrap() { assert_eq!(parser.screen().cell(1, 2).unwrap().contents(), "a"); assert_eq!(parser.screen().cell(1, 3).unwrap().contents(), ""); + let mut new_parser = vt100::Parser::default(); + new_parser.process(&parser.screen().contents_formatted()); + assert_eq!(new_parser.screen().contents(), parser.screen().contents()); + parser.process(b"\x1b[H\x1b[J"); assert_eq!(parser.screen().contents(), ""); parser.process(b" "); -- cgit v1.2.3-54-g00ecf