about summary refs log tree commit diff
path: root/Src/Zle
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Zle')
-rw-r--r--Src/Zle/zle_main.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c
index e6f83cb3e..1acff3bbb 100644
--- a/Src/Zle/zle_main.c
+++ b/Src/Zle/zle_main.c
@@ -1481,6 +1481,17 @@ resetprompt(UNUSED(char **args))
     return redisplay(NULL);
 }
 
+/* same bug called from outside zle */
+
+/**/
+mod_export void
+zle_resetprompt(void)
+{   reexpandprompt();
+    if (zleactive)
+        redisplay(NULL);
+}
+
+
 /**/
 mod_export void
 trashzle(void)
@@ -1572,6 +1583,7 @@ setup_(UNUSED(Module m))
 {
     /* Set up editor entry points */
     trashzleptr = trashzle;
+    zle_resetpromptptr = zle_resetprompt;
     zrefreshptr = zrefresh;
     zleaddtolineptr = zleaddtoline;
     zlegetlineptr = zlegetline;
@@ -1659,6 +1671,7 @@ finish_(UNUSED(Module m))
 
     /* editor entry points */
     trashzleptr = noop_function;
+    zle_resetpromptptr = noop_function;
     zrefreshptr = noop_function;
     zleaddtolineptr = noop_function_int;
     zlegetlineptr = NULL;