Skip to content

Fix multi-line wrapping by wide character#170

Open
akikareha wants to merge 1 commit into
lichray:mainfrom
akikareha:widewrap
Open

Fix multi-line wrapping by wide character#170
akikareha wants to merge 1 commit into
lichray:mainfrom
akikareha:widewrap

Conversation

@akikareha

Copy link
Copy Markdown

Current nvi2 display drops some characters when wrapped by wide character.
This patch fixes it.

Explanation.

This is logically one line of Kanji wide character sequence wrapped at right screen border.

一二三四五六七八九十一二三四五六七八九十|
一二三四五六七八九十一二三四五六七八九十|
一二三四五六七八九十一二三四五六七八九十|
一二三四五六七八九十一二三四五六七八九十|

Inserting narrow spaces on half of screen width.

Following is current nvi2 behavior (wrong).

一二三四五六七八九十 一二三四五六七八九 |
十一二三四五六七八九十 一二三四五六七八 |(九)
十一二三四五六七八九十 一二三四五六七八 |
九十一二三四五六七八九十 一二三四五六七 |(八)
九十

Original nvi2 drops wrapping characters one by two lines.
Second line dropps 九 and fourth line dropps 八.

Following is fixed with this patch.

一二三四五六七八九十 一二三四五六七八九 |
十一二三四五六七八九十 一二三四五六七八 |
九十一二三四五六七八九十 一二三四五六七 |
八九十一二三四五六七八九十 一二三四五六 |
七八九十

Screenshots

nvi2-wrap-wrong_2026-06-02_19-25-27 nvi2-wrap-fixed_2026-06-02_19-29-11

@lichray

lichray commented Jun 3, 2026

Copy link
Copy Markdown
Owner

Reproduced. Nice work.

@lichray

lichray commented Jun 3, 2026

Copy link
Copy Markdown
Owner

Is this about #169?

@akikareha

Copy link
Copy Markdown
Author

Is this about #169?

No.
#170 is text displaying problem.
#169 is only related to cursor position in insert mode, but may be affected by #170.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants