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

Using :w as shortcut in insert mode leaves buffer with unsaved marker #11024

Closed
fintara opened this issue Jun 23, 2024 · 0 comments · Fixed by #11062
Closed

Using :w as shortcut in insert mode leaves buffer with unsaved marker #11024

fintara opened this issue Jun 23, 2024 · 0 comments · Fixed by #11062
Labels
C-bug Category: This is a bug

Comments

@fintara
Copy link

fintara commented Jun 23, 2024

Summary

The bufferline shows a [+] marker next to the files that have unsaved changes. I have a shortcut that saves the file. However, even though the file was indeed saved, the marker remains.

Moreover, if my shortcut is C-s = ["normal_mode", ":write"], then there are rare cases when the marker disappears.
If I do the sequence ["normal_mode", ":write"] manually, then it all works fine 100% of the time. It seems that some race occurs when it's used as a shortcut. This may be a separate issue though.

Reproduction Steps

# config.yaml
[editor]
bufferline = "always"

[keys.insert]
C-s = ":write"
  1. Open a file
  2. Make a change - the file has [+] in the buffer line and buffer picker
  3. Press Ctrl+s on the keyboard
    • <file> written in the status text below
    • the file is indeed written

What I expect to happen:

  • the [+] marker disappears

What happens:

  • the [+] marker remains after multiple Ctrl+s presses

Helix log

No response

Platform

Linux / macOS

Terminal Emulator

gnome-terminal, iTerm

Installation Method

brew / dnf install

Helix Version

helix 24.3 (2cadec0)

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.

1 participant