Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Whole statusline "empties out" when filename doesn't fit #10078

Closed
RudolfMan opened this issue Apr 1, 2024 · 5 comments · Fixed by #10642
Closed

Whole statusline "empties out" when filename doesn't fit #10078

RudolfMan opened this issue Apr 1, 2024 · 5 comments · Fixed by #10642
Labels
A-gui Area: Helix gui improvements C-bug Category: This is a bug
Milestone

Comments

@RudolfMan
Copy link

RudolfMan commented Apr 1, 2024

Summary

When current buffer's filename is long and doesn't fit the statusline - everything from there disappears.

Reproduction Steps

I tried this:

  1. hx
  2. Open a file with a name (including path to the file) that's longer than the width of the view/split.

For example when split vertically, or resize the terminal window.

I tried :redraw doesn't help.

See the screenrecording:

Screen.Recording.2024-03-31.at.8.38.57.PM.mov

Helix log

It doesn't crash or anything.. and nothing really helpful to me in logs..

~/.cache/helix/helix.log
2024-03-31T20:33:15.024 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2024-03-31T20:33:15.024 helix_view::document [DEBUG] id 3 modified - last saved: 0, current: 0
2024-03-31T20:33:15.024 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2024-03-31T20:33:15.158 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2024-03-31T20:33:15.159 helix_view::document [DEBUG] id 3 modified - last saved: 0, current: 0
2024-03-31T20:33:15.159 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2024-03-31T20:33:15.907 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2024-03-31T20:33:15.908 helix_view::document [DEBUG] id 3 modified - last saved: 0, current: 0
2024-03-31T20:33:15.908 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2024-03-31T20:33:16.360 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2024-03-31T20:33:16.361 helix_view::document [DEBUG] id 3 modified - last saved: 0, current: 0
2024-03-31T20:33:16.361 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2024-03-31T20:33:19.927 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2024-03-31T20:33:19.928 helix_view::document [DEBUG] id 3 modified - last saved: 0, current: 0
2024-03-31T20:33:19.928 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0

Platform

macOS 13.6.4

Terminal Emulator

wezterm 20240203-110809-5046fc22, alacritty 0.13.1 (fe2a3c5)

Installation Method

brew

Helix Version

helix 24.3 (2cadec0)

@RudolfMan RudolfMan added the C-bug Category: This is a bug label Apr 1, 2024
@the-mikedavis
Copy link
Member

This is a consequence of #9122. We should add an else clause here:

that fits as much of the left statusline as will fit, or tries to truncate the longest span(s)

@the-mikedavis the-mikedavis added the E-has-instructions Call for participation: Has instructions for fixing the issue and opening a PR label Apr 1, 2024
@archseer
Copy link
Member

archseer commented Apr 1, 2024

I regret merging #9122 so close to the release, there was quite a few regressions. Should we have a patch release for this?

@hamrik
Copy link
Contributor

hamrik commented Apr 1, 2024

At this point I'm considering reverting the refactor. There are more unforeseen consequences of it than potential benefits.

I've begun working on the autohide feature but the inner view dimensions seem to be quite hard-coded for clipping a space for the statusline, and making that that dynamic might not be worth pursuing for the time being.

@the-mikedavis Should I revert the changes?

@the-mikedavis
Copy link
Member

I think the changes are still good - with the old render functions we couldn't middle-align the center statusline part like in #9950 or do the truncation I mentioned above.

This is pretty easy to hit but not all that limiting: you can still get the current document path from the % register or view it in the buffer picker. I would prefer that we do a short release cycle this time (1-2 months) rather than backport a fix for this into a patch release

@hamrik
Copy link
Contributor

hamrik commented Apr 1, 2024

Started working on a draft PR to address this: #10087.

It needs more work/discussion, though.

I apologize for the mess.

@the-mikedavis the-mikedavis added this to the 24.04 milestone Apr 4, 2024
@kirawi kirawi added the A-gui Area: Helix gui improvements label Apr 15, 2024
@the-mikedavis the-mikedavis removed the E-has-instructions Call for participation: Has instructions for fixing the issue and opening a PR label May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-gui Area: Helix gui improvements C-bug Category: This is a bug
Projects
None yet
5 participants