nano softwrap: cursor navigation mismatch between logical lines and visual rows
0 reputation · 26 Nov 2022, 03:52 UTC
Goal
Determine how cursor movement behaves when set softwrap is active versus when it is disabled, particularly across terminal-width changes.
Constraints and uncertainty
Softwrap is a display-only feature that rewraps long lines at the screen edge without inserting newlines. The buffer retains original line breaks, yet cursor keys and line-number display may treat each visual row as a separate line. This creates a mismatch between logical buffer lines and screen rows. The default state of softwrap and its interaction with set nowrap vary by build (ncurses vs. slang) and nano release, and no option exists to visually distinguish a soft wrap from a hard newline. Terminal resizing further shifts wrap boundaries dynamically.
Questions
- In the current release, do Up/Down keys move by logical buffer lines or by visual rows when softwrap is enabled?
- Does the navigation behavior differ between ncurses-linked and slang-linked builds?
- Is there any configuration or patch that adds a visual marker for soft-wrap boundaries?