summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-08-18 12:09:12 -0300
committerGabriel Schneider <[email protected]>2026-08-18 23:45:25 -0300
commitc24a9e40215bc30c68c9db7675f1c6a07d9bbae3 (patch)
tree9afdb1f3d128bda3f3cf4837c2893982b0a8f69c /test
parent31fece62f56aa2311e2325de83659edbc9e641db (diff)
downloadpardes-c24a9e40215bc30c68c9db7675f1c6a07d9bbae3.tar.gz
pardes-c24a9e40215bc30c68c9db7675f1c6a07d9bbae3.zip
modal + file_pane: rework editing math and pane behavior, config/syntax additions, unit tests
Diffstat (limited to 'test')
-rw-r--r--test/snapshots/badutf.golden2
-rw-r--r--test/snapshots/badutf.snap11
2 files changed, 6 insertions, 7 deletions
diff --git a/test/snapshots/badutf.golden b/test/snapshots/badutf.golden
index dceef522..fda9f8a7 100644
--- a/test/snapshots/badutf.golden
+++ b/test/snapshots/badutf.golden
@@ -32,7 +32,7 @@
== snap hscroll-midglyph grid=50x30 cursor=46,2
|New Newcol Find Grep Help Tutor Dump NextColor Deb
| /tmp/pardes-snap/badutf/cwd/wide.txt Save New De
-| 1 ��語 日本語 日本語 日本語 tail
+| 1 日本語 日本語 日本語 日本語 日本語 tail
| 2
| 3
|
diff --git a/test/snapshots/badutf.snap b/test/snapshots/badutf.snap
index 49d90bdd..46592178 100644
--- a/test/snapshots/badutf.snap
+++ b/test/snapshots/badutf.snap
@@ -1,7 +1,7 @@
# Invalid UTF-8 must RENDER, never panic. Two sources, both ordinary use:
# a file pane holds whatever bytes are on disk (latin-1, a truncated sequence,
-# an ELF opened by mistake), and the byte-column hscroll cuts a multi-byte
-# glyph in half by design. Undecodable bytes come out as U+FFFD, one per byte.
+# an ELF opened by mistake). Undecodable bytes come out as U+FFFD, while
+# horizontal scrolling must start at a complete grapheme boundary.
file bad.txt hello \xff\xfe world\nlatin-1 caf\xe9 tail\ntruncated \xe6\x97 here\nend\n
file wide.txt \xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e \xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e \xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e \xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e \xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e \xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e \xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e tail\nsecond line\n
start 30 100 bad.txt
@@ -9,15 +9,14 @@ wait 8000 New Newcol
stable 700 20000
snap badbytes
# 50 columns, not 100: a FILE boots alone and fills the window, and at 100 the
-# whole line fits, so `$` scrolls nowhere and there is no glyph to cut. This is
+# whole line fits, so `$` scrolls nowhere. This is
# the width the left column used to be, i.e. the pane this case was written for
start 30 50 wide.txt
wait 8000 New Newcol
stable 700 20000
# SPC t w turns soft wrap OFF: hscroll is the other half of this case and a
-# wrapped body has nothing to scroll sideways, so the byte cut that halves a
-# glyph only exists here. (The WRAP cut halves one too — same bytes, same
-# U+FFFD — and wrap.snap pins that one.)
+# wrapped body has nothing to scroll sideways. The unwrapped view must keep the
+# first visible CJK glyph intact instead of starting inside its UTF-8 bytes.
key space t w
stable 400 5000
key $