Skip to content

:wq! should not quit (and lose the changes) if there are no permissions to write the file #2864

Closed
@Pistahh

Description

@Pistahh

Summary

I cannot reopen #1575 - but I think the way it was fixed is wrong.
Now `:wq!' still exits when it can't write the file, losing the changes. I think it shouldn't exit. vim doesn't exit.

Reproduction Steps

I tried this:

  1. hx /etc/hosts - should be a file without permissions to write it
  2. change it
  3. try to save and exit with :wq!

I expected this to happen:

editor displays an error message about the permission issue and it stays in the editor, just like vim.

Instead, this happened:

editor displays an error message about the permission issue and exits, losing all the changes

Helix log

No response

Platform

Linux, zsh.

Terminal Emulator

terminator

Helix Version

helix 22.05 (c107f4e)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-helix-termArea: Helix term improvementsC-bugCategory: This is a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions