1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-12-16 09:01:25 +01:00

51557: Clarify availability of ksh-mode parameters, improve vi-mode detection.

This commit is contained in:
Bart Schaefer 2023-03-11 13:20:21 -08:00
parent 8424fe5e23
commit 25dceb1dea
3 changed files with 13 additions and 5 deletions

View file

@ -168,8 +168,9 @@ ksh93_wrapper(Eprog prog, FuncWrap w, char *name)
if (zleactive) {
extern mod_import_variable char *curkeymapname; /* XXX */
extern mod_import_variable char *varedarg; /* XXX */
/* How to distinguish emacs bindings? */
if (curkeymapname && strcmp(curkeymapname, "main") == 0)
/* bindkey -v forces VIMODE so this test is as good as any */
if (curkeymapname && isset(VIMODE) &&
strcmp(curkeymapname, "main") == 0)
strcpy(sh_edmode, "\e");
else
strcpy(sh_edmode, "");