[vim/vim] Cmdline history not updated when mapping both <Up> and <CR> (PR #18607)

12 views
Skip to first unread message

zeertzjq

unread,
Oct 20, 2025, 9:08:41 AM (23 hours ago) Oct 20
to vim/vim, Subscribed

Problem: Cmdline history not updated when mapping both and .
Solution: Consider the command typed when in Cmdline mode and there is
no pending input.

fixes: #2771
related: neovim/neovim#36256

Although the existing behavior technically does match documentation, the
"completely come from mappings" part is a bit ambiguous, because one may
argue that the command doesn't completely come from mappings as long as
the user has typed a key in Cmdline mode. I'm not entirely sure if this
change will cause problems, but it seems unlikely.


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/18607

Commit Summary

  • 6eab2a9 Cmdline history not updated when mapping both <Up> and <CR>

File Changes

(3 files)

Patch Links:


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18607@github.com>

zeertzjq

unread,
Oct 20, 2025, 9:14:14 AM (23 hours ago) Oct 20
to vim/vim, Push

@zeertzjq pushed 1 commit.

  • f60a7b4 Cmdline history not updated when mapping both <Up> and <CR>


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18607/before/6eab2a92e1eee82ad4fe06e04f4e2729a858ec41/after/f60a7b412cb08a87e341c7218533add73cd120d4@github.com>

zeertzjq

unread,
Oct 20, 2025, 9:15:00 AM (23 hours ago) Oct 20
to vim/vim, Push

@zeertzjq pushed 1 commit.

  • 92d4827 Cmdline history not updated when mapping both <Up> and <CR>

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18607/before/f60a7b412cb08a87e341c7218533add73cd120d4/after/92d48274a66e124df4df9729706d3074db9e9db8@github.com>

zeertzjq

unread,
Oct 20, 2025, 9:17:38 AM (23 hours ago) Oct 20
to vim/vim, Subscribed

@zeertzjq commented on this pull request.


In runtime/doc/cmdline.txt:

> +- Only commands that are typed are remembered.  A command coming completely
+  from a mapping is not put in the history.

This also matches :h ": better:

		The command-line is only stored in this register when at least
		one character of it was typed.  Thus it remains unchanged if
		the command was completely from a mapping.

There it says "a mapping" instead of "mappings".


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18607/review/3356434559@github.com>

zeertzjq

unread,
Oct 20, 2025, 9:23:30 AM (22 hours ago) Oct 20
to vim/vim, Push

@zeertzjq pushed 1 commit.

  • 7b6ddca Cmdline history not updated when mapping both <Up> and <CR>

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18607/before/92d48274a66e124df4df9729706d3074db9e9db8/after/7b6ddca94f4a11d8dc78ef60b7ed1025ed36cc50@github.com>

zeertzjq

unread,
Oct 20, 2025, 9:44:06 AM (22 hours ago) Oct 20
to vim/vim, Push

@zeertzjq pushed 1 commit.

  • 210a700 Cmdline history not updated when mapping both <Up> and <CR>

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18607/before/7b6ddca94f4a11d8dc78ef60b7ed1025ed36cc50/after/210a70060cfeb8e1003bd3fae40fc269162a7583@github.com>

zeertzjq

unread,
Oct 20, 2025, 10:44:39 AM (21 hours ago) Oct 20
to vim/vim, Push

@zeertzjq pushed 1 commit.

  • d8849b5 Cmdline history not updated when mapping both <Up> and <CR>

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18607/before/210a70060cfeb8e1003bd3fae40fc269162a7583/after/d8849b5988421ee87f2a08da57bc96d242e6380b@github.com>

Reply all
Reply to author
Forward
0 new messages