Skip to content

:reload should fail if unsaved changes #5680

@vwkd

Description

@vwkd

I'd like to suggest the reload command to fail if there are unsaved changes and adding an explicit reload! that discards unsaved changes, similar to q or bc.

Currently, reload discards changes anyway.

Sometimes it's useful to reload a file only if there aren't any changes. For example, when changing the underlying file through another source I reload to not revert the changes on the next save in helix. However, if I have unsaved changes, I'd like that helix prevents me from reloading so I don't lose the changes. I know I can undo, but sometimes the changes are not visible in the current window. An explicit confirmation would be better.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-helix-termArea: Helix term improvementsC-enhancementCategory: ImprovementsE-easyCall for participation: Experience needed to fix: Easy / not muchE-good-first-issueCall for participation: Issues suitable for new contributors

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions