about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Src/Zle/zle_hist.c4
2 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 78ba84809..af2fac8d2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2014-03-03  Oliver Kiddle  <opk@zsh.org>
 
+	* 32450: Src/Zle/zle_hist.c: make get-line set the history
+	number that was saved with the line
+
 	* 32448: Src/Zle/zle_params.c: fix seg fault after recursive-edit
 
 	* 32439 (with Yuri D'Elia): Completion/Base/Core/_main_complete:
diff --git a/Src/Zle/zle_hist.c b/Src/Zle/zle_hist.c
index bd5bc36d5..44b39d186 100644
--- a/Src/Zle/zle_hist.c
+++ b/Src/Zle/zle_hist.c
@@ -890,6 +890,10 @@ zgetline(UNUSED(char **args))
 	free(s);
 	free(lineadd);
 	clearlist = 1;
+	if (stackhist != -1) {
+	    histline = stackhist;
+	    stackhist = -1;
+	}
     }
     return 0;
 }