You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After running :write from a two character keybinding, it produces a phantom change (from either normal or insert mode)
It seems to depend somewhat on what kind of change I make. If I press O to create a newline, and save, it happens. d to delete a line then save, it doesn't. It appears to be consistent, related to the kinds of changes.
FWIW, I think this is different than #2192, since it happens from both normal and insert mode.
Reproduction Steps
I tried this:
In my config, I have the following keybindings:
[keys.insert.";"]
a = "normal_mode"
w = ["normal_mode", ":w"]
[keys.normal.";"]
a = "no_op"
w = ":write"
After making any change, I hit the ; key followed by w.
I expected this to happen:
File written.
Instead, this happened:
The file is written, however the "unsaved" plus flag remains.
ex:
NOR ~/.config/helix/config.toml [+] 1 sel 4:1
'~/.config/helix/config.toml' written, 36L 665B
Hitting the same key series again right afterwards will save the file again and this time remove the flag.
Helix log
~/.cache/helix/helix.log
Log of opening Helix, O to create new line then ;, then w.
2024-01-11T23:18:21.379 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 1
2024-01-11T23:18:21.446 helix_view::document [DEBUG] submitting save of doc 'Some("/Users/brian/.config/helix/config.toml")'
2024-01-11T23:18:21.447 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 1
2024-01-11T23:18:21.447 helix_term::application [DEBUG] received editor event: DocumentSaved(Ok(DocumentSavedEvent { revision: 1, doc_id: DocumentId(1), path: "/Users/brian/.config/helix/config.toml", text: ["[editor]\n\nauto-pairs = false\nsoft-wrap.enable = true\n\n\n[keys.insert]\n# up = \"no_op\"\n# down = \"no_op\"\n# left = \"no_op\"\n# right = \"no_op\"\npageup = \"no_op\"\npagedown = \"no_op\"\nhome = \"no_op\"\nend = \"no_op\"\n\n[keys.insert.\";\"]\na = \"normal_mode\"\nw = [\"normal_mode\", \":w\"]\n# \";\" = \":append-output /bin/echo -n \\\";\\\"\"\n\n[keys.normal]\nZ = { Q = \":quit!\", Z = \":write-quit-all\" }\nC-j = \":buffer-next\"\nC-k = \":buffer-previous\"\n\n# Search for word under cursor\n\"*\" = [\"move_char_right\", \"move_prev_word_start\", \"move_next_word_end\", \"search_selection\", \"search_next\"]\n\n[keys.normal.\";\"]\na = \"no_op\"\nw = \":write\"\n# \";\" = \"collapse_selection\"\n\n[editor.lsp]\ndisplay-inlay-hints = true\n"] }))
2024-01-11T23:18:21.447 helix_term::application [DEBUG] document Some("/Users/brian/.config/helix/config.toml") saved with revision 1
2024-01-11T23:18:21.447 helix_view::document [DEBUG] doc 1 revision updated 0 -> 1
2024-01-11T23:18:21.447 helix_lsp::file_event [DEBUG] Received file event for "/Users/brian/.config/helix/config.toml"
2024-01-11T23:18:21.447 helix_view::editor [DEBUG] editor status: '~/.config/helix/config.toml' written, 37L 666B
2024-01-11T23:18:21.447 helix_view::document [DEBUG] id 1 modified - last saved: 1, current: 1
2024-01-11T23:18:21.698 helix_term::application [DEBUG] received editor event: IdleTimer
2024-01-11T23:18:23.123 helix_view::document [DEBUG] id 1 modified - last saved: 1, current: 1
2024-01-11T23:18:23.251 helix_view::document [DEBUG] id 1 modified - last saved: 1, current: 1
2024-01-11T23:18:23.251 helix_term::job [DEBUG] waiting on jobs...
2024-01-11T23:18:23.251 helix_view::document [DEBUG] id 1 modified - last saved: 1, current: 1
2024-01-11T23:18:23.251 helix_term::job [DEBUG] waiting on jobs...
Summary
After running
:write
from a two character keybinding, it produces a phantom change (from either normal or insert mode)It seems to depend somewhat on what kind of change I make. If I press
O
to create a newline, and save, it happens.d
to delete a line then save, it doesn't. It appears to be consistent, related to the kinds of changes.FWIW, I think this is different than #2192, since it happens from both normal and insert mode.
Reproduction Steps
I tried this:
In my config, I have the following keybindings:
After making any change, I hit the
;
key followed byw
.I expected this to happen:
File written.
Instead, this happened:
The file is written, however the "unsaved" plus flag remains.
ex:
Hitting the same key series again right afterwards will save the file again and this time remove the flag.
Helix log
~/.cache/helix/helix.log
Log of opening Helix,
O
to create new line then;
, thenw
.Platform
macOS
Terminal Emulator
iTerm
Installation Method
brew
Helix Version
helix 23.10 (f6021dd)
The text was updated successfully, but these errors were encountered: