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_refresh.c3
-rw-r--r--Src/Zle/zle_tricky.c1
2 files changed, 4 insertions, 0 deletions
diff --git a/Src/Zle/zle_refresh.c b/Src/Zle/zle_refresh.c
index 8ce678756..80be27f03 100644
--- a/Src/Zle/zle_refresh.c
+++ b/Src/Zle/zle_refresh.c
@@ -444,6 +444,7 @@ void
 set_region_highlight(UNUSED(Param pm), char **aval)
 {
     int len;
+    char **av = aval;
     struct region_highlight *rhp;
 
     len = aval ? arrlen(aval) : 0;
@@ -490,6 +491,8 @@ set_region_highlight(UNUSED(Param pm), char **aval)
 
 	match_highlight(strp, &rhp->atr);
     }
+
+    freearray(av);
 }
 
 
diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c
index 3c7cff9c1..b916bd653 100644
--- a/Src/Zle/zle_tricky.c
+++ b/Src/Zle/zle_tricky.c
@@ -2795,6 +2795,7 @@ doexpandhist(void)
     if (!err) {
 	zlemetacs = excs;
 	if (strcmp(zlemetaline, ol)) {
+	    zle_restore_positions();
 	    unmetafy_line();
 	    /* For vi mode -- reset the beginning-of-insertion pointer   *
 	     * to the beginning of the line.  This seems a little silly, *