diff options
Diffstat (limited to 'Src')
-rw-r--r-- | Src/Zle/complist.c | 11 | ||||
-rw-r--r-- | Src/Zle/zle_tricky.c | 4 |
2 files changed, 10 insertions, 5 deletions
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 { |