aboutsummaryrefslogtreecommitdiffstats
path: root/zellij-server/src/panes/unit/grid_tests.rs
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2022-04-26 22:38:54 +0200
committerGitHub <noreply@github.com>2022-04-26 22:38:54 +0200
commit22b68c06547d9b35ee079e0a846913b16a311c74 (patch)
tree3b1d635fe27195ce3837e601d087d53ba585f53f /zellij-server/src/panes/unit/grid_tests.rs
parentfix(nix): separate default plugins (#1342) (diff)
downloadsl0ppij-22b68c06547d9b35ee079e0a846913b16a311c74.tar.gz
sl0ppij-22b68c06547d9b35ee079e0a846913b16a311c74.tar.xz
sl0ppij-22b68c06547d9b35ee079e0a846913b16a311c74.zip
fix(compatibility): fix crash and don't allow cursor beyond row width (#1349)
* fix(compatibility): fix crash and don't allow cursor beyond row width * style(fmt): rustfmt
Diffstat (limited to 'zellij-server/src/panes/unit/grid_tests.rs')
-rw-r--r--zellij-server/src/panes/unit/grid_tests.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/zellij-server/src/panes/unit/grid_tests.rs b/zellij-server/src/panes/unit/grid_tests.rs
index b0e00f9a..eac87284 100644
--- a/zellij-server/src/panes/unit/grid_tests.rs
+++ b/zellij-server/src/panes/unit/grid_tests.rs
@@ -1792,3 +1792,20 @@ fn terminal_pixel_size_reports_in_unsupported_terminals() {
expected,
);
}
+
+#[test]
+pub fn ansi_csi_at_sign() {
+ let mut vte_parser = vte::Parser::new();
+ let mut grid = Grid::new(
+ 51,
+ 112,
+ Palette::default(),
+ Rc::new(RefCell::new(LinkHandler::new())),
+ Rc::new(RefCell::new(None)),
+ );
+ let content = "foo\u{1b}[2D\u{1b}[2@".as_bytes();
+ for byte in content {
+ vte_parser.advance(&mut grid, *byte);
+ }
+ assert_snapshot!(format!("{:?}", grid));
+}