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

add customizable read-only indicator to statusbar #2862

Closed
wants to merge 44 commits into from
Closed

add customizable read-only indicator to statusbar #2862

wants to merge 44 commits into from

Conversation

sbromberger
Copy link
Contributor

closes #2627.

@sbromberger sbromberger changed the title add read-only flag to statusbar add customizable read-only indicator to statusbar Jun 23, 2022
aaron404 and others added 3 commits June 23, 2022 10:06
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
simplify text and offset computation

Co-authored-by: Gokul Soumya <gokulps15@gmail.com>
@sbromberger
Copy link
Contributor Author

Would it be possible to get this reviewed soon? Merging will require me to modify #2831 but this lays the groundwork for these sorts of changes.

@the-mikedavis
Copy link
Member

If anything, we may want to wait on this for #2434 and then split out the helix_view::editor::StatusLineElement::FileName component into separate elements for the modification and read-only indicators.

Whether to default this to being enabled or disabled is worth some discussion: kakoune does not show a read-only indicator but vim does.

@sbromberger
Copy link
Contributor Author

sbromberger commented Jun 25, 2022

kakoune does not show a read-only indicator but vim does.

The problem we currently have with helix is that it's possible to lose work because of the lack of realization that you're editing a RO file.

@the-mikedavis
Copy link
Member

That particular issue was fixed recently: #1575

@sbromberger
Copy link
Contributor Author

That particular issue was fixed recently: #1575

Wow, I didn't even see that merged. Thanks!

@sbromberger
Copy link
Contributor Author

Turns out this was more straightforward than I had expected (thanks to the great new statusline implementation). This works for me locally but more review would be appreciated.

sbromberger and others added 4 commits July 21, 2022 05:56
Updates documentation to reflect decision re: defaulting to never showing bufferline.
Copy link
Member

@the-mikedavis the-mikedavis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking good to me. I think enabling this by default is a good choice 👍

helix-term/src/ui/statusline.rs Outdated Show resolved Hide resolved
helix-view/src/document.rs Outdated Show resolved Hide resolved
helix-view/src/document.rs Outdated Show resolved Hide resolved
@dead10ck
Copy link
Member

dead10ck commented Sep 3, 2022

@the-mikedavis is there anything else this PR needs?

@the-mikedavis
Copy link
Member

The bufferline commits should probably be dropped out of the changes but otherwise this looks good to me

@sbromberger sbromberger closed this by deleting the head repository Sep 3, 2022
@sbromberger sbromberger mentioned this pull request Sep 5, 2022
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.

No warning when editing a readonly file
5 participants