diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2001-06-13 14:03:44 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2001-06-13 14:03:44 +0000 |
commit | a5a5aa4e3e43d3e83a5aa8770f9170ea6ace6e32 (patch) | |
tree | f4d2595c7e9d0336bd7e2ef5a137767327251e5c /Src/Zle/complist.c | |
parent | 6bb50488ab28461e52784590bf0e7744aa5bc120 (diff) | |
download | zsh-a5a5aa4e3e43d3e83a5aa8770f9170ea6ace6e32.tar.gz zsh-a5a5aa4e3e43d3e83a5aa8770f9170ea6ace6e32.tar.xz zsh-a5a5aa4e3e43d3e83a5aa8770f9170ea6ace6e32.zip |
fixes for display bugs for completion lists (cursor left one line to far up or down) (14903)
Diffstat (limited to 'Src/Zle/complist.c')
-rw-r--r-- | Src/Zle/complist.c | 11 |
1 files changed, 7 insertions, 4 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; |