diff options
author | luukvbaal <luukvbaal@gmail.com> | 2025-01-02 15:40:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-02 06:40:39 -0800 |
commit | 43d552c56648bc3125c7509b3d708b6bf6c0c09c (patch) | |
tree | 0fe37677e6184c9229fce1a8d8dbb9e7f3dff6b4 /src/nvim/ex_cmds.c | |
parent | 48e2a73610ca5639408f79b3d8eebd3e5f57a327 (diff) | |
download | rneovim-43d552c56648bc3125c7509b3d708b6bf6c0c09c.tar.gz rneovim-43d552c56648bc3125c7509b3d708b6bf6c0c09c.tar.bz2 rneovim-43d552c56648bc3125c7509b3d708b6bf6c0c09c.zip |
feat(ui): more intuitive :substitute confirm prompt #31787
Problem: Unknown key mappings listed in substitute confirm message.
Solution: Include hints as to what the key mappings do.
Diffstat (limited to 'src/nvim/ex_cmds.c')
-rw-r--r-- | src/nvim/ex_cmds.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c index 0510619825..073b9594ed 100644 --- a/src/nvim/ex_cmds.c +++ b/src/nvim/ex_cmds.c @@ -3793,10 +3793,11 @@ static int do_sub(exarg_T *eap, const proftime_T timeout, const int cmdpreview_n curwin->w_p_fen = save_p_fen; - snprintf(IObuff, IOSIZE, _("replace with %s (y/n/a/q/l/^E/^Y)?"), sub); - char *prompt = xstrdup(IObuff); - typed = prompt_for_input(prompt, HLF_R, true, NULL); - xfree(prompt); + char *p = _("replace with %s? (y)es/(n)o/(a)ll/(q)uit/(l)ast/scroll up(^E)/down(^Y)"); + snprintf(IObuff, IOSIZE, p, sub); + p = xstrdup(IObuff); + typed = prompt_for_input(p, HLF_R, true, NULL); + xfree(p); p_lz = save_p_lz; RedrawingDisabled = temp; |