diff options
author | Oliver Kiddle <opk@zsh.org> | 2025-03-03 01:24:46 +0100 |
---|---|---|
committer | Oliver Kiddle <opk@zsh.org> | 2025-03-03 01:30:32 +0100 |
commit | 435cb1b748ce1f2f5c38edc1d64f4ee2424f9b3a (patch) | |
tree | 65f0bb4ddc554199fc76c610ab7cb7e843aedb5d /Src/Zle/zle_keymap.c | |
parent | 71f35afa1cd48d6c25a517797e543cb2aa23a47b (diff) | |
download | zsh-435cb1b748ce1f2f5c38edc1d64f4ee2424f9b3a.tar.gz zsh-435cb1b748ce1f2f5c38edc1d64f4ee2424f9b3a.zip |
53399: don't load ZLE early to set keymap
When zsh is run with -o vi / -o emacs, instead of loading ZLE to force
the change, only record the option state. Then when ZLE starts, the vi
option determines the default keymap.
Diffstat (limited to 'Src/Zle/zle_keymap.c')
-rw-r--r-- | Src/Zle/zle_keymap.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Src/Zle/zle_keymap.c b/Src/Zle/zle_keymap.c index ce52abe66..7f31f837c 100644 --- a/Src/Zle/zle_keymap.c +++ b/Src/Zle/zle_keymap.c @@ -1452,7 +1452,10 @@ default_bindings(void) linkkeymap(oppmap, "viopp", 0); linkkeymap(vismap, "visual", 0); linkkeymap(smap, ".safe", 1); - linkkeymap(emap, "main", 0); + if (isset(VIMODE)) + linkkeymap(vmap, "main", 0); + else + linkkeymap(emap, "main", 0); /* the .safe map cannot be modified or deleted */ smap->flags |= KM_IMMUTABLE; |