summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAidan Van Duyne <aidanvanduyne@gmail.com>2025-12-07 17:59:03 -0800
committerOliver Kiddle <opk@zsh.org>2025-12-16 01:17:28 +0100
commite97e326c161bbfd3b127526bace0b3574598415a (patch)
tree156021acc97864525dce8c383642cfb023f8e7b7
parent54147: avoid buffer overflow with terminal sequences (diff)
downloadzsh-e97e326c161bbfd3b127526bace0b3574598415a.tar
zsh-e97e326c161bbfd3b127526bace0b3574598415a.tar.gz
zsh-e97e326c161bbfd3b127526bace0b3574598415a.tar.bz2
zsh-e97e326c161bbfd3b127526bace0b3574598415a.tar.lz
zsh-e97e326c161bbfd3b127526bace0b3574598415a.tar.xz
zsh-e97e326c161bbfd3b127526bace0b3574598415a.tar.zst
zsh-e97e326c161bbfd3b127526bace0b3574598415a.zip
54143: Bind '_' to vi-first-non-blank in vicmd keymap
-rw-r--r--ChangeLog3
-rw-r--r--Doc/Zsh/zle.yo2
-rw-r--r--Src/Zle/zle_bindings.c2
3 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 8f6b9adbb..323d70bc5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2025-12-16 Oliver Kiddle <opk@zsh.org>
+ * Aidan Van Duyne: 54143: Src/Zle/zle_bindings.c,
+ Doc/Zsh/zle.yo: Bind '_' to vi-first-non-blank in vicmd keymap
+
* 54147: Src/Zle/termquery.c: avoid buffer overflow with
terminal sequences
diff --git a/Doc/Zsh/zle.yo b/Doc/Zsh/zle.yo
index a0d97a0c8..8c1cd078d 100644
--- a/Doc/Zsh/zle.yo
+++ b/Doc/Zsh/zle.yo
@@ -1328,7 +1328,7 @@ Read a character from the keyboard, and move to
the position just after the previous occurrence of it in the line.
)
tindex(vi-first-non-blank)
-item(tt(vi-first-non-blank) (unbound) (tt(^)) (unbound))(
+item(tt(vi-first-non-blank) (unbound) (tt(_ ^)) (unbound))(
Move to the first non-blank character in the line.
)
tindex(vi-forward-word)
diff --git a/Src/Zle/zle_bindings.c b/Src/Zle/zle_bindings.c
index 55863db1b..74a62ab4d 100644
--- a/Src/Zle/zle_bindings.c
+++ b/Src/Zle/zle_bindings.c
@@ -385,7 +385,7 @@ int vicmdbind[128] = {
/* \ */ z_undefinedkey,
/* ] */ z_undefinedkey,
/* ^ */ z_vifirstnonblank,
- /* _ */ z_undefinedkey,
+ /* _ */ z_vifirstnonblank,
/* ` */ z_vigotomark,
/* a */ z_viaddnext,
/* b */ z_vibackwardword,