1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-15 01:34:26 +02:00

Fix micro editor preset (#4156)

- **PR Description**

I don't know what was I thinking when making #3049, because Micro does
not actually support `--` as delimiter between options and files. As
such, when trying to edit files with `micro` set as editor, an empty
file named `--` would be open first.

This PR fixes this by explicitly defining a preset for `micro`. I've
double-tested it to make sure that it doesn't behave wierdly any more :D
This commit is contained in:
Stefan Haller
2025-01-09 08:51:39 +01:00
committed by GitHub

View File

@ -68,7 +68,13 @@ func getPreset(osConfig *OSConfig, guessDefaultEditor func() string) *editPreset
},
"lvim": standardTerminalEditorPreset("lvim"),
"emacs": standardTerminalEditorPreset("emacs"),
"micro": standardTerminalEditorPreset("micro"),
"micro": {
editTemplate: "micro {{filename}}",
editAtLineTemplate: "micro +{{line}} {{filename}}",
editAtLineAndWaitTemplate: "micro +{{line}} {{filename}}",
openDirInEditorTemplate: "micro {{dir}}",
suspend: returnBool(true),
},
"nano": standardTerminalEditorPreset("nano"),
"kakoune": standardTerminalEditorPreset("kak"),
"helix": {