Skip to content

fix: preserve document wrap preferences - #631

Merged
nklmilojevic merged 1 commit into
mainfrom
fix/629-detail-wrap
Sep 17, 2026
Merged

nklmilojevic merged 1 commit into
mainfrom
fix/629-detail-wrap

Conversation

@nklmilojevic

Copy link
Copy Markdown
Owner

Opening a new document reset line wrapping to off. This change keeps the selected wrap setting across document views, configuration reloads, and context switches.

Set detail_wrap = true in the configuration to enable wrapping at startup. The default remains false. Changes made with w apply to the current session and do not write to the configuration file. Log wrapping remains separate.

Added documentation and tests for configuration formats, startup overrides, reopened documents, and describe results.

Validation: just check passed (formatting, Clippy, and tests).

Closes #629

New documents reset wrapping to false. Keep the session setting when a document is replaced and add detail_wrap as a saved startup default.

Closes #629
@greptile-apps

greptile-apps Bot commented Sep 17, 2026

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

The PR appears safe to merge; the configured startup value and subsequent session preference are consistently preserved across document replacement paths.

Summary

This PR adds a configurable startup preference for document wrapping and preserves the active session preference whenever document views are replaced.

  • Adds detail_wrap to TOML/YAML configuration with a default of false.
  • Initializes document wrapping from the resolved startup configuration.
  • Carries the current wrap state across YAML, describe, diff, events, diagnostics, journal, plugin, bundle, and related document views.
  • Documents the distinction between session-level document wrapping and log wrapping.
  • Adds configuration-format and document-lifecycle coverage.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Resolve startup configuration] --> B[Initialize app.detail.wrap]
    B --> C[Open document view]
    C --> D[Copy current wrap into new Scrollable]
    D --> E[Render document]
    E -->|w key| F[Toggle session wrap]
    F --> C
    E -->|Reload or context switch| C
Loading

Reviews (1) · Last reviewed commit: "fix: preserve document wrap preferences"

@nklmilojevic
nklmilojevic merged commit a0a7b56 into main Sep 17, 2026
4 checks passed
@nklmilojevic
nklmilojevic deleted the fix/629-detail-wrap branch September 17, 2026 11:07
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.

feat: persist text wrap setting across sessions/views

1 participant