summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--Src/prompt.c3
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 2a32a9e3c..ebafdae8a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-05-12 Peter Stephenson <p.w.stephenson@ntlworld.com>
+
+ * 26958: Src/prompt.c: Reallocation of prompt line didn't
+ fix the pointer to the start of the current line.
+
2009-05-12 Peter Stephenson <pws@csr.com>
* unposted: Functions/Prompts/prompt_bart_setup: fix a warning
@@ -11698,5 +11703,5 @@
*****************************************************
* This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.4684 $
+* $Revision: 1.4685 $
*****************************************************
diff --git a/Src/prompt.c b/Src/prompt.c
index 20e21e391..e56b70d0b 100644
--- a/Src/prompt.c
+++ b/Src/prompt.c
@@ -841,6 +841,7 @@ addbufspc(int need)
if((bv->bp - bv->buf) + need > bv->bufspc) {
int bo = bv->bp - bv->buf;
int bo1 = bv->bp1 ? bv->bp1 - bv->buf : -1;
+ ptrdiff_t bufline_off = bv->bufline ? bv->bufline - bv->buf : -1;
if(need & 255)
need = (need | 255) + 1;
@@ -848,6 +849,8 @@ addbufspc(int need)
bv->bp = bv->buf + bo;
if(bo1 != -1)
bv->bp1 = bv->buf + bo1;
+ if (bufline_off != -1)
+ bv->bufline = bv->buf + bufline_off;
}
}