Skip to content

Commit

Permalink
42650: fix 42156 for zero-sized terminals
Browse files Browse the repository at this point in the history
Also fix harmless no-op typo from hand-applying 42636 for previous commit.
  • Loading branch information
bartschaefer committed Apr 15, 2018
1 parent 517cda3 commit 68d9526
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 2 additions & 0 deletions ChangeLog
@@ -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>
Expand Down
12 changes: 7 additions & 5 deletions Src/utils.c
Expand Up @@ -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;
}

Expand All @@ -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;
}

Expand Down Expand Up @@ -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++;
Expand Down

0 comments on commit 68d9526

Please sign in to comment.