Skip to content

fix(statusline): compact displayed file paths - #284

Merged
fcoury-oai merged 1 commit into
mainfrom
fcoury/statusline-smart-path
Aug 18, 2026
Merged

fcoury-oai merged 1 commit into
mainfrom
fcoury/statusline-smart-path

Conversation

@fcoury-oai

Copy link
Copy Markdown
Collaborator

Absolute buffer paths can consume most of the status line and hide the filename when terminal space is constrained.

This makes the filename section relative to the current working directory when possible. Filename and relative-path sections now elide from the left when they overflow, keeping the most useful tail of the path visible while preserving the existing truncation behavior for other sections. Paths outside the current folder remain unchanged.

How to Test

  1. From the repository root, run cargo run -- "$(pwd)/src/editor/rendering.rs". The status line should show src/editor/rendering.rs without the repository prefix.
  2. Narrow the terminal until the path no longer fits. The path should start with … and continue to show the filename at the right edge.
  3. Run cargo test --lib statusline -- --test-threads=1; all status-line tests should pass.

@fcoury-oai
fcoury-oai merged commit c7af566 into main Aug 18, 2026
10 checks passed
@fcoury-oai
fcoury-oai deleted the fcoury/statusline-smart-path branch August 18, 2026 21:26
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.

1 participant