mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-09-28 15:01:21 +02:00
22597: back off two column-subtraction hunks
This commit is contained in:
parent
7315dbb385
commit
d5b3716e1c
@ -1,3 +1,9 @@
|
||||
2006-08-10 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* 22597: Src/Zle/complist.c, Src/Zle/zle_tricky.c: back off
|
||||
two hunks of 22594 which appeared to both unnecessary and
|
||||
incorrect.
|
||||
|
||||
2006-08-10 Barton E. Schaefer <schaefer@brasslantern.com>
|
||||
|
||||
* 22595: Src/Zle/complist.c: paranoid bounds-checking on some
|
||||
|
@ -1055,8 +1055,12 @@ compprintfmt(char *fmt, int n, int dopr, int doesc, int ml, int *stop)
|
||||
if (stat && n)
|
||||
mfirstl = -1;
|
||||
|
||||
mlprinted = l + (cc ? ((cc-1) / columns) : 0);
|
||||
return mlprinted;
|
||||
/*
|
||||
* *Not* subtracting 1 from cc at this point appears to be
|
||||
* correct. C.f. printfmt in zle_tricky.c.
|
||||
*/
|
||||
mlprinted = l + (cc / columns);
|
||||
return mlprinted;
|
||||
}
|
||||
|
||||
/* This is like zputs(), but allows scrolling. */
|
||||
|
@ -2175,7 +2175,12 @@ printfmt(char *fmt, int n, int dopr, int doesc)
|
||||
putc(' ', shout);
|
||||
}
|
||||
}
|
||||
return l + ((cc-1) / columns);
|
||||
/*
|
||||
* Experiments suggest that at this point not subtracting 1 from
|
||||
* cc is correct, i.e. if just misses wrapping we still add 1.
|
||||
* (Why?)
|
||||
*/
|
||||
return l + (cc / columns);
|
||||
}
|
||||
|
||||
/* This is used to print expansions. */
|
||||
|
Loading…
Reference in New Issue
Block a user