From 9af24d9dc020f419c7b60753680e4edc6d8428b7 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sat, 7 Dec 2019 06:37:29 -0500 Subject: fix positioning cursor past end of line when there are wide characters --- tests/data/fixtures/wrap.in | 1 + tests/data/fixtures/wrap/29.json | 20 ++++++++++++++++++++ tests/data/fixtures/wrap/29.typescript | 2 ++ 3 files changed, 23 insertions(+) create mode 100644 tests/data/fixtures/wrap/29.json create mode 100644 tests/data/fixtures/wrap/29.typescript (limited to 'tests') diff --git a/tests/data/fixtures/wrap.in b/tests/data/fixtures/wrap.in index f079817..1c85cb2 100644 --- a/tests/data/fixtures/wrap.in +++ b/tests/data/fixtures/wrap.in @@ -26,3 +26,4 @@ a \x1bc\x1b[1;79Habcd \x1b[H\x1b[@ \x1bc\x1b[1;80Haa\x1b[T\x1b[@ +\x1bc\na\x1b[1;79Hデ\n diff --git a/tests/data/fixtures/wrap/29.json b/tests/data/fixtures/wrap/29.json new file mode 100644 index 0000000..7c0324d --- /dev/null +++ b/tests/data/fixtures/wrap/29.json @@ -0,0 +1,20 @@ +{ + "contents": " デ\na", + "cells": { + "0,78": { + "contents": "デ", + "is_wide": true + }, + "0,79": { + "contents": "", + "is_wide_continuation": true + }, + "1,0": { + "contents": "a" + } + }, + "cursor_position": [ + 1, + 80 + ] +} \ No newline at end of file diff --git a/tests/data/fixtures/wrap/29.typescript b/tests/data/fixtures/wrap/29.typescript new file mode 100644 index 0000000..2248a91 --- /dev/null +++ b/tests/data/fixtures/wrap/29.typescript @@ -0,0 +1,2 @@ +c +aデ -- cgit v1.2.3-54-g00ecf