projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Don Heap spotted that our heuristics for dealing with IPv6 literal addresses
[u/mdw/putty]
/
terminal.c
diff --git
a/terminal.c
b/terminal.c
index
2f7527c
..
311df18
100644
(file)
--- a/
terminal.c
+++ b/
terminal.c
@@
-1535,6
+1535,11
@@
void term_size(Terminal *term, int newrows, int newcols, int newsavelines)
newsavelines == term->savelines)
return; /* nothing to do */
+ /* Behave sensibly if we're given zero (or negative) rows/cols */
+
+ if (newrows < 1) newrows = 1;
+ if (newcols < 1) newcols = 1;
+
deselect(term);
swap_screen(term, 0, FALSE, FALSE);