fix: avoid indentation-only wrapped rows
The shared wrapper treated leading whitespace as a usable word boundary, pushing a long first token onto a continuation and leaving a numbered blank row. Only record boundaries after non-whitespace content on the current visual row. Preserve source whitespace, tab stops, caret rows and paired diff alignment. Verified: 945 tests, formatting, and live ordinary/split-diff fixture smoke, including wrap off/on and aligned closing brackets.
This commit is contained in:
+1
-1
@@ -236,7 +236,7 @@ Use `:word_wrap.toggle`, the **Toggle word wrap** palette action, or `config.cor
|
||||
|
||||
Toggling preserves the source caret and anchors a visible caret to its previous screen row in ordinary and diff buffers. File boundaries clamp the anchor when there are not enough preceding rows. Horizontal position follows the reflowed text.
|
||||
|
||||
Text wraps at word boundaries where possible, with grapheme-safe breaks for long words. Whitespace is preserved; tabs keep their source-column stops and wide/combining Unicode characters retain their geometry. Only the first display segment shows a line number. Syntax and semantic colors, diagnostics, search matches, selections, and cursors follow the wrapped text. Motions and counts still use source lines, so `j`/`k`, Home/End, and saved file contents are unchanged. Vertical wheel input scrolls continuation rows; switching wrapping off restores horizontal scrolling.
|
||||
Text wraps at word boundaries where possible, with grapheme-safe breaks for long words. Word-break opportunities require non-whitespace text on the visual row, so indentation alone does not push a long identifier onto a new row. Whitespace is preserved; tabs keep their source-column stops and wide/combining Unicode characters retain their geometry. Only the first display segment shows a line number. Syntax and semantic colors, diagnostics, search matches, selections, and cursors follow the wrapped text. Motions and counts still use source lines, so `j`/`k`, Home/End, and saved file contents are unchanged. Vertical wheel input scrolls continuation rows; switching wrapping off restores horizontal scrolling.
|
||||
|
||||
## Current-line Git blame
|
||||
|
||||
|
||||
Reference in New Issue
Block a user