aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/w32console.c21
2 files changed, 25 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index fcbc03aa08c..4be86b6c76f 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12005-07-06 Jason Rumney <jasonr@gnu.org>
2
3 * w32console.c (initialize_w32_display): Detect when the console
4 dimensions are insane, and default to 80x25 instead.
5 (w32_use_full_screen_buffer): default to NIL.
6
12005-07-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> 72005-07-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2 8
3 * macterm.c (mac_draw_vertical_window_border): Use foreground of 9 * macterm.c (mac_draw_vertical_window_border): Use foreground of
diff --git a/src/w32console.c b/src/w32console.c
index 70578f58c6b..0ebda179667 100644
--- a/src/w32console.c
+++ b/src/w32console.c
@@ -635,7 +635,24 @@ initialize_w32_display (void)
635 meta_key = 1; 635 meta_key = 1;
636 char_attr_normal = info.wAttributes; 636 char_attr_normal = info.wAttributes;
637 637
638 if (w32_use_full_screen_buffer) 638 /* Determine if the info returned by GetConsoleScreenBufferInfo
639 is realistic. Old MS Telnet servers used to only fill out
640 the dwSize portion, even modern one fill the whole struct with
641 garbage when using non-MS telnet clients. */
642 if ((w32_use_full_screen_buffer
643 && (info.dwSize.Y < 20 || info.dwSize.Y > 100
644 || info.dwSize.X < 40 || info.dwSize.X > 200))
645 || (!w32_use_full_screen_buffer
646 && (info.srWindow.Bottom - info.srWindow.Top < 20
647 || info.srWindow.Bottom - info.srWindow.Top > 100
648 || info.srWindow.Right - info.srWindow.Left < 40
649 || info.srWindow.Right - info.srWindow.Left > 100)))
650 {
651 FRAME_LINES (SELECTED_FRAME ()) = 25;
652 SET_FRAME_COLS (SELECTED_FRAME (), 80);
653 }
654
655 else if (w32_use_full_screen_buffer)
639 { 656 {
640 FRAME_LINES (SELECTED_FRAME ()) = info.dwSize.Y; /* lines per page */ 657 FRAME_LINES (SELECTED_FRAME ()) = info.dwSize.Y; /* lines per page */
641 SET_FRAME_COLS (SELECTED_FRAME (), info.dwSize.X); /* characters per line */ 658 SET_FRAME_COLS (SELECTED_FRAME (), info.dwSize.X); /* characters per line */
@@ -691,7 +708,7 @@ This is desirable when running Emacs over telnet, and is the default.
691A value of nil means use the current console window dimensions; this 708A value of nil means use the current console window dimensions; this
692may be preferrable when working directly at the console with a large 709may be preferrable when working directly at the console with a large
693scroll-back buffer. */); 710scroll-back buffer. */);
694 w32_use_full_screen_buffer = 1; 711 w32_use_full_screen_buffer = 0;
695 712
696 defsubr (&Sset_screen_color); 713 defsubr (&Sset_screen_color);
697 defsubr (&Sset_cursor_size); 714 defsubr (&Sset_cursor_size);