42650: fix 42156 for zero-sized terminals

Also fix harmless no-op typo from hand-applying 42636 for previous commit.
This commit is contained in:
Barton E. Schaefer 2018-04-15 11:06:43 -07:00
parent 517cda3832
commit 68d9526220
2 changed files with 9 additions and 5 deletions

View File

@ -1,5 +1,7 @@
2018-04-15 Barton E. Schaefer <schaefer@zsh.org>
* 42650: Src/utils.c: fix 42156 for zero-sized terminals
* 42636: Src/utils.c: fix GLOB_DOTS for !(RM_STAR_SILENT)
2018-04-13 Daniel Hahler <zsh@thequod.de>

View File

@ -1834,8 +1834,9 @@ adjustlines(int signalled)
else
shttyinfo.winsize.ws_row = zterm_lines;
#endif /* TIOCGWINSZ */
if (zterm_lines < 0) {
DPUTS(signalled, "BUG: Impossible TIOCGWINSZ rows");
if (zterm_lines <= 0) {
DPUTS(signalled && zterm_lines < 0,
"BUG: Impossible TIOCGWINSZ rows");
zterm_lines = tclines > 0 ? tclines : 24;
}
@ -1858,8 +1859,9 @@ adjustcolumns(int signalled)
else
shttyinfo.winsize.ws_col = zterm_columns;
#endif /* TIOCGWINSZ */
if (zterm_columns < 0) {
DPUTS(signalled, "BUG: Impossible TIOCGWINSZ cols");
if (zterm_columns <= 0) {
DPUTS(signalled && zterm_columns < 0,
"BUG: Impossible TIOCGWINSZ cols");
zterm_columns = tccolumns > 0 ? tccolumns : 80;
}
@ -2777,7 +2779,7 @@ checkrmall(char *s)
int ignoredots = !isset(GLOBDOTS);
char *fname;
while (fname = zreaddir(rmd, 1)) {
while ((fname = zreaddir(rmd, 1))) {
if (ignoredots && *fname == '.')
continue;
count++;