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

:q (quit) command unexpected behaviour (unsaved buffer) with auto-save by delay #10991

Closed
justforcomment opened this issue Jun 18, 2024 · 1 comment · Fixed by #11047
Closed
Labels
C-bug Category: This is a bug

Comments

@justforcomment
Copy link

justforcomment commented Jun 18, 2024

Summary

When you enable autosave by delay, the :q (quit) command does not work as expected, the editor does not allow you to exit, although the changes have already been made to the disk.

At the same time, changes in .toml (may other also) files or files without extension, it works correctly.

On video the expected behavior is shown first, then the problem described.

auto_save_with_quit.mp4

Reproduction Steps

I tried this:

  1. hx

I expected this to happen: write change with auto-save, then just quit

Instead, this happened: occurs warning of unsaved buffer

Helix log

It is unexpected behaviour only.

~/.cache/helix/helix.log

helix.log

Platform

Linux/Devuan

Terminal Emulator

Kitty

Installation Method

source

Helix Version

helix 24.3

@justforcomment justforcomment added the C-bug Category: This is a bug label Jun 18, 2024
@the-mikedavis
Copy link
Member

This is ultimately the same as #11024 but it's very easy to trigger with auto-save. For auto-save in particular an easy solution would be to prevent saving while in insert mode. We would need to trigger the auto-save handler on the mode change hook too though to make sure we save after waiting a while between the last edit and switching between insert and normal modes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants