diff options
Diffstat (limited to 'Src')
-rw-r--r-- | Src/prompt.c | 3 |
1 files changed, 3 insertions, 0 deletions
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; } } |