dselect dies on terminal window resize
I've noticed that dselect will die anytime I try and resize my terminal
window at the main menu, failing with the message "dselect: failed to getch
in main menu: Success". Here's a patch that fixes the problem for me.
Comments? Any problems with it? If not can this be incorporated?
BTW, to all dpkg developers - thanks for all your hard work on such
wonderful software!
--Tom Joseph
--- dpkg-1.9.11/dselect/main.cc Sat Jun 16 19:39:31 2001
+++ ../debian/dpkg-1.9.11/dselect/main.cc Wed Jun 20 20:19:57 2001
@@ -265,7 +265,13 @@
do
c= getch();
while (c == ERR && errno == EINTR);
- if (c==ERR) ohshite(_("failed to getch in main menu"));
+ if (c==ERR) {
+ if(errno != 0)
+ ohshite(_("failed to getch in main menu"));
+ else {
+ clearok(stdscr,TRUE); clear(); refreshmenu(); dme(cursor,1);
+ }
+ }
if (c==C('n') || c==KEY_DOWN || c==' ' || c=='j') {
dme(cursor,0); cursor++; cursor %= entries; dme(cursor,1);
} else if (c==C('p') || c==KEY_UP || c==C('h') ||
Reply to: