/[emacs]/emacs/src/w32console.c
ViewVC logotype

Diff of /emacs/src/w32console.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.35 by kfstorm, Fri Mar 21 22:56:52 2003 UTC revision 1.36 by kfstorm, Sat May 24 22:05:05 2003 UTC
# Line 121  clear_to_end (void) Line 121  clear_to_end (void)
121  {  {
122    struct frame * f = PICK_FRAME ();    struct frame * f = PICK_FRAME ();
123    
124    clear_end_of_line (FRAME_WIDTH (f) - 1);    clear_end_of_line (FRAME_COLS (f) - 1);
125    ins_del_lines (cursor_coords.Y, FRAME_HEIGHT (f) - cursor_coords.Y - 1);    ins_del_lines (cursor_coords.Y, FRAME_LINES (f) - cursor_coords.Y - 1);
126  }  }
127    
128  /* Clear the frame.  */  /* Clear the frame.  */
# Line 138  clear_frame (void) Line 138  clear_frame (void)
138    GetConsoleScreenBufferInfo (GetStdHandle (STD_OUTPUT_HANDLE), &info);    GetConsoleScreenBufferInfo (GetStdHandle (STD_OUTPUT_HANDLE), &info);
139    
140    /* Remember that the screen buffer might be wider than the window.  */    /* Remember that the screen buffer might be wider than the window.  */
141    n = FRAME_HEIGHT (f) * info.dwSize.X;    n = FRAME_LINES (f) * info.dwSize.X;
142    dest.X = dest.Y = 0;    dest.X = dest.Y = 0;
143    
144    FillConsoleOutputAttribute (cur_screen, char_attr_normal, n, dest, &r);    FillConsoleOutputAttribute (cur_screen, char_attr_normal, n, dest, &r);
# Line 180  ins_del_lines (int vpos, int n) Line 180  ins_del_lines (int vpos, int n)
180    if (n < 0)    if (n < 0)
181      {      {
182        scroll.Top = vpos - n;        scroll.Top = vpos - n;
183        scroll.Bottom = FRAME_HEIGHT (f);        scroll.Bottom = FRAME_LINES (f);
184        dest.Y = vpos;        dest.Y = vpos;
185      }      }
186    else    else
187      {      {
188        scroll.Top = vpos;        scroll.Top = vpos;
189        scroll.Bottom = FRAME_HEIGHT (f) - n;        scroll.Bottom = FRAME_LINES (f) - n;
190        dest.Y = vpos + n;        dest.Y = vpos + n;
191      }      }
192    scroll.Left = 0;    scroll.Left = 0;
193    scroll.Right = FRAME_WIDTH (f);    scroll.Right = FRAME_COLS (f);
194    
195    dest.X = 0;    dest.X = 0;
196    
# Line 213  ins_del_lines (int vpos, int n) Line 213  ins_del_lines (int vpos, int n)
213            for (i = scroll.Bottom; i < dest.Y; i++)            for (i = scroll.Bottom; i < dest.Y; i++)
214              {              {
215                move_cursor (i, 0);                move_cursor (i, 0);
216                clear_end_of_line (FRAME_WIDTH (f));                clear_end_of_line (FRAME_COLS (f));
217              }              }
218          }          }
219      }      }
# Line 226  ins_del_lines (int vpos, int n) Line 226  ins_del_lines (int vpos, int n)
226            for (i = nb; i < scroll.Top; i++)            for (i = nb; i < scroll.Top; i++)
227              {              {
228                move_cursor (i, 0);                move_cursor (i, 0);
229                clear_end_of_line (FRAME_WIDTH (f));                clear_end_of_line (FRAME_COLS (f));
230              }              }
231          }          }
232      }      }
# Line 256  scroll_line (int dist, int direction) Line 256  scroll_line (int dist, int direction)
256    if (direction == LEFT)    if (direction == LEFT)
257      {      {
258        scroll.Left = cursor_coords.X + dist;        scroll.Left = cursor_coords.X + dist;
259        scroll.Right = FRAME_WIDTH (f) - 1;        scroll.Right = FRAME_COLS (f) - 1;
260      }      }
261    else    else
262      {      {
263        scroll.Left = cursor_coords.X;        scroll.Left = cursor_coords.X;
264        scroll.Right = FRAME_WIDTH (f) - dist - 1;        scroll.Right = FRAME_COLS (f) - dist - 1;
265      }      }
266    
267    dest.X = cursor_coords.X;    dest.X = cursor_coords.X;
# Line 661  initialize_w32_display (void) Line 661  initialize_w32_display (void)
661    
662    if (w32_use_full_screen_buffer)    if (w32_use_full_screen_buffer)
663      {      {
664        FRAME_HEIGHT (SELECTED_FRAME ()) = info.dwSize.Y; /* lines per page */        FRAME_LINES (SELECTED_FRAME ()) = info.dwSize.Y;  /* lines per page */
665        SET_FRAME_WIDTH (SELECTED_FRAME (), info.dwSize.X);  /* characters per line */        SET_FRAME_COLS (SELECTED_FRAME (), info.dwSize.X);  /* characters per line */
666      }      }
667    else    else
668      {      {
669        /* Lines per page.  Use buffer coords instead of buffer size.  */        /* Lines per page.  Use buffer coords instead of buffer size.  */
670        FRAME_HEIGHT (SELECTED_FRAME ()) = 1 + info.srWindow.Bottom -        FRAME_LINES (SELECTED_FRAME ()) = 1 + info.srWindow.Bottom -
671          info.srWindow.Top;          info.srWindow.Top;
672        /* Characters per line.  Use buffer coords instead of buffer size.  */        /* Characters per line.  Use buffer coords instead of buffer size.  */
673        SET_FRAME_WIDTH (SELECTED_FRAME (), 1 + info.srWindow.Right -        SET_FRAME_COLS (SELECTED_FRAME (), 1 + info.srWindow.Right -
674                         info.srWindow.Left);                         info.srWindow.Left);
675      }      }
676    

Legend:
Removed from v.1.35  
changed lines
  Added in v.1.36

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26