diff options
author | Barton E. Schaefer <schaefer@zsh.org> | 2018-04-15 11:06:43 -0700 |
---|---|---|
committer | Barton E. Schaefer <schaefer@zsh.org> | 2018-04-15 11:06:43 -0700 |
commit | 68d9526220d77466a75928fc6a20008cf64e0590 (patch) | |
tree | 3bb7bea8a34565092dcab125da9371a4712da874 | |
parent | 517cda383217ae4c68c5782429a5dbc4962b407a (diff) | |
download | zsh-68d9526220d77466a75928fc6a20008cf64e0590.tar.gz zsh-68d9526220d77466a75928fc6a20008cf64e0590.tar.xz zsh-68d9526220d77466a75928fc6a20008cf64e0590.zip |
42650: fix 42156 for zero-sized terminals
Also fix harmless no-op typo from hand-applying 42636 for previous commit.
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | Src/utils.c | 12 |
2 files changed, 9 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog index 388d052c8..a8e2f10a5 100644 --- a/ChangeLog +++ b/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> diff --git a/Src/utils.c b/Src/utils.c index cb292a050..b41851700 100644 --- a/Src/utils.c +++ b/Src/utils.c @@ -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++; |