From f8d93888a8efd6c8142e74ece83b38632661de47 Mon Sep 17 00:00:00 2001 From: Jun-ichi Takimoto Date: Wed, 2 Nov 2022 16:27:27 +0900 Subject: 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. --- Src/options.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Src/options.c') 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; } -- cgit v1.2.3