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

Split modification indicator from file statusline elements #4731

Merged
merged 12 commits into from
Feb 10, 2023

Conversation

cbclemmer
Copy link
Contributor

attempts to close #4686

Adds a new "file-dirty" status line element that can replace the [+] symbol that appears after the file name.
This allows the element to be added before the "file-name" element so the dirty symbol will be visible for long file/directory names.
Adds logic to keep the dirty element after the "file-name" element if it is not in the list. This keeps current config files and the default configuration working as they were before while allowing the dirty element to be placed wherever the config file specifies.

@the-mikedavis
Copy link
Member

Let's call this "FileModificationIndicator"

@cbclemmer
Copy link
Contributor Author

@the-mikedavis Ok, I found a reference to dirty somewhere so that's why I called it that.

@cbclemmer
Copy link
Contributor Author

@the-mikedavis I changed it along with the other related variables.

@kirawi kirawi added A-gui Area: Helix gui improvements S-waiting-on-review Status: Awaiting review from a maintainer. labels Nov 14, 2022
helix-term/src/ui/statusline.rs Outdated Show resolved Hide resolved
helix-term/src/ui/statusline.rs Outdated Show resolved Hide resolved
helix-term/src/ui/statusline.rs Outdated Show resolved Hide resolved
helix-term/src/ui/statusline.rs Outdated Show resolved Hide resolved
@kirawi kirawi added R-breaking-change This PR is a breaking change for some behavior S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from a maintainer. labels Nov 19, 2022
@cbclemmer
Copy link
Contributor Author

@kirawi Is there anything you are waiting for me on this PR?

@the-mikedavis the-mikedavis added S-waiting-on-review Status: Awaiting review from a maintainer. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 13, 2023
@kirawi
Copy link
Member

kirawi commented Jan 14, 2023

@the-mikedavis I feel like this is a fairly uncontroversial change.

@cbclemmer
Copy link
Contributor Author

@kirawi @the-mikedavis The tests are passing now. I didn't see that before.

@theteachr
Copy link
Contributor

We could make the element customizable.

@the-mikedavis the-mikedavis changed the title Separate dirty part of file-name status line element into its own file-dirty element Split modification indicator from file statusline elements Feb 10, 2023
@the-mikedavis the-mikedavis merged commit ea3293b into helix-editor:master Feb 10, 2023
@theteachr
Copy link
Contributor

I believe this one needs an update in the configuration docs.

@the-mikedavis
Copy link
Member

Ah good catch, a new line for this should be added in this table

The following statusline elements can be configured:

@theteachr
Copy link
Contributor

theteachr commented Feb 18, 2023

Created #6036 to update the docs.

theteachr added a commit to theteachr/helix that referenced this pull request Aug 14, 2023
@theteachr theteachr mentioned this pull request Aug 14, 2023
dead10ck pushed a commit that referenced this pull request Aug 14, 2023
dgkf pushed a commit to dgkf/helix that referenced this pull request Jan 30, 2024
mtoohey31 pushed a commit to mtoohey31/helix that referenced this pull request Jun 2, 2024
smortime pushed a commit to smortime/helix that referenced this pull request Jul 10, 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 R-breaking-change This PR is a breaking change for some behavior S-waiting-on-review Status: Awaiting review from a maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

It should be possible to tell there are unsaved changes to the buffer, even with long file paths.
4 participants