Repository navigation
Add native word wrap toggle with cutoff as the default - #129
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Long multiline values force tall rows even after users drag them smaller. Add an icon-only word-wrap action immediately beside CSV: Switch Between Table and Text in the native editor title bar. Hover shows CSV: Enable Word Wrap or CSV: Disable Word Wrap, according to the active table’s state. Remove the separate in-grid toolbar row.
Each file starts with wrap off, displaying single-line cutoff with an ellipsis at the existing automatic width cap. An explicit wrap choice is retained in that view’s webview state. The action preserves the selected cell/range, reveals its endpoint after reflow, and retains manual sizes and full values for editing, clipboard, Find and saving. A live range is no longer collapsed to its anchor when focus returns from a title action. Saved and untitled editable tables share this action; text, preview and comparison views omit it.
Native commands
csv.enableWordWrapandcsv.disableWordWrapprovide state-dependent hover text and Command Palette actions. No global setting is added. The test installer is version 1.5.1.Cutoff retains opaque frozen-row dividers and the high-contrast selection/Find outline colors. Also correct a fractional collapsed-border resize probe found during testing, keeping its grab area narrow.
Validation:
npm test: 705 passed, zero failures; includes CSV/TSV selection, complete clipboard values, live drafts/caret, focus-return ranges, state restoration, viewport following, command routing and title-action contributions.npm run lint: zero errors; 82 existing warnings.Actual webview captures below exclude the native editor title bar: