summaryrefslogtreecommitdiff
path: root/Src/options.c
diff options
context:
space:
mode:
authorJun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>2022-11-02 16:27:27 +0900
committerJun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>2022-11-02 16:27:27 +0900
commitf8d93888a8efd6c8142e74ece83b38632661de47 (patch)
tree71a804635690405184aca5f330777c5c59c2e60b /Src/options.c
parent7a2e3b9039a866ad0b45a70b498fad1ae5ad7de7 (diff)
downloadzsh-f8d93888a8efd6c8142e74ece83b38632661de47.tar.gz
zsh-f8d93888a8efd6c8142e74ece83b38632661de47.zip
50851: restore typtab when necessary
inittyptab() must be called when returning from a function with "setopt localoptions MULTIBYTE|BANGHIST|SHSTDIN", and also in function dosetopt() when setting these options (via $options, for example). We intentionally did not take account of the options EMACS/VI because these options are obsolete and their use is not recommended.
Diffstat (limited to 'Src/options.c')
-rw-r--r--Src/options.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/Src/options.c b/Src/options.c
index a1fe918fc..a994b563e 100644
--- a/Src/options.c
+++ b/Src/options.c
@@ -904,7 +904,11 @@ dosetopt(int optno, int value, int force, char *new_opts)
keyboardhackchar = (value ? '`' : '\0');
}
new_opts[optno] = value;
- if (optno == BANGHIST || optno == SHINSTDIN)
+ if (
+#ifdef MULTIBYTE_SUPPORT
+ optno == MULTIBYTE ||
+#endif
+ optno == BANGHIST || optno == SHINSTDIN)
inittyptab();
return 0;
}