From c24a9e40215bc30c68c9db7675f1c6a07d9bbae3 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 18 Aug 2026 12:09:12 -0300 Subject: modal + file_pane: rework editing math and pane behavior, config/syntax additions, unit tests --- test/snapshots/badutf.golden | 2 +- test/snapshots/badutf.snap | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'test') 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 $ -- cgit v1.3