diff options
| author | Peter Geissler <peter@haxx.in> | 2026-08-28 13:25:19 +0200 |
|---|---|---|
| committer | Peter Geissler <peter@haxx.in> | 2026-08-28 13:25:19 +0200 |
| commit | a1388560b2adfc7a3ec98438b4183710d4f466e2 (patch) | |
| tree | c8f766f459efe78c4fb53d0a2a54f7f882c2f37c /docs | |
| parent | docs: the Windows port, and what is different there (diff) | |
| download | slosh-a1388560b2adfc7a3ec98438b4183710d4f466e2.tar.gz slosh-a1388560b2adfc7a3ec98438b4183710d4f466e2.tar.xz slosh-a1388560b2adfc7a3ec98438b4183710d4f466e2.zip | |
windows: fall back to `edit`, not to a notepad window
`C-a e` on a Windows with no editor installed opened notepad, which is
a GUI program: the pane it was spawned in drew nothing, so the split
sat there empty while the config opened in a window somewhere else.
The toast said as much, but a pane you have to be told to ignore is
still the wrong answer.
Windows 11 24H2 ships Microsoft Edit as `edit`, and it is a console
program -- it fills the pane like nvim or nano would, so the fallback
now has the same shape as the thing it is falling back from, and a
first-time user gets a usable editor without installing one.
It goes last of the console editors rather than first. Having fetched
nvim is a statement of preference; having been shipped `edit` says
nothing about what you want, so anything you chose yourself outranks
it. notepad stays behind it: `edit` is not on Windows 10, or on 11
before 24H2, and something that opens is better than nothing when the
alternative is an empty pane.
sl_which() already tries .exe, so it is found as installed; the search
still only runs when neither EDITOR nor the config asked for anything.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/windows.md | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/docs/windows.md b/docs/windows.md index 9e1975f..12b4a8c 100644 --- a/docs/windows.md +++ b/docs/windows.md @@ -126,10 +126,15 @@ the session on the one program that misbehaves. Whoever finishes last frees. full argv without reading another process's memory, so pane titles are correspondingly shorter. - **No editor is guaranteed.** `C-a e` prefers whichever console editor is - actually installed — `nvim`, `vim`, `vi`, `nano`, `micro`, `hx` — because the - obvious fallback is the wrong shape: `notepad` is a GUI program, so a pane - running it draws nothing and looks broken. If none is found it still opens - notepad, and says so, rather than leaving you an empty pane to puzzle over. - `EDITOR` and the config's `editor` are honoured ahead of the search. + actually installed — `nvim`, `vim`, `vi`, `nano`, `micro`, `hx`, `edit` — + because the obvious fallback is the wrong shape: `notepad` is a GUI program, + so a pane running it draws nothing and looks broken. Microsoft Edit (`edit`) + is a console program, so it fills a pane like any other editor: from Windows + 11 24H2 there is a usable editor without installing one. It comes last of the + console editors because it arrives on its own, and so says nothing about what + you want, where having fetched nvim does. Older Windows does not ship it, so + if nothing is found slosh still opens notepad, and says so, rather than + leaving you an empty pane to puzzle over. `EDITOR` and the config's `editor` + are honoured ahead of the search. - **`--check`, `--dump-config`, layouts, workspaces and shaders** are unaffected: they never touched a pty or a socket. |
