diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | Src/Zle/complist.c | 11 | ||||
-rw-r--r-- | Src/Zle/zle_tricky.c | 4 |
3 files changed, 16 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog index 7d346f8c6..882719631 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2001-06-13 Sven Wischnowsky <wischnow@zsh.org> + + * 14903: Src/Zle/complist.c, Src/Zle/zle_tricky.c: fixes for + display bugs for completion lists (cursor left one line to far + up or down) + 2001-06-13 Peter Stephenson <pws@csr.com> * 14893: Src/signals.c: make handler mod_export because it's diff --git a/Src/Zle/complist.c b/Src/Zle/complist.c index 4975a39ae..f76e54116 100644 --- a/Src/Zle/complist.c +++ b/Src/Zle/complist.c @@ -887,7 +887,7 @@ compprintfmt(char *fmt, int n, int dopr, int doesc, int ml, int *stop) if (*p == '\n') { if (dopr == 1 && mlbeg >= 0 && tccan(TCCLEAREOL)) tcout(TCCLEAREOL); - l += 1 + (cc / columns); + l += 1 + ((cc - 1) / columns); cc = 0; } if (dopr == 1) { @@ -909,9 +909,12 @@ compprintfmt(char *fmt, int n, int dopr, int doesc, int ml, int *stop) } } } - if (dopr && mlbeg >= 0 && tccan(TCCLEAREOL)) - tcout(TCCLEAREOL); - + if (dopr) { + if (!(cc % columns)) + fputs(" \010", shout); + if (mlbeg >= 0 && tccan(TCCLEAREOL)) + tcout(TCCLEAREOL); + } if (stat && n) mfirstl = -1; diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c index f2e6524ee..5886b4114 100644 --- a/Src/Zle/zle_tricky.c +++ b/Src/Zle/zle_tricky.c @@ -1949,7 +1949,7 @@ printfmt(char *fmt, int n, int dopr, int doesc) putc(' ', shout); } } - l += 1 + (cc / columns); + l += 1 + ((cc - 1) / columns); cc = 0; } if (dopr) { @@ -1960,6 +1960,8 @@ printfmt(char *fmt, int n, int dopr, int doesc) } } if (dopr) { + if (!(cc % columns)) + fputs(" \010", shout); if (tccan(TCCLEAREOL)) tcout(TCCLEAREOL); else { |