Changeset 5eeea3b for mainwin.c


Ignore:
Timestamp:
Aug 17, 2002, 3:23:00 PM (22 years ago)
Author:
Erik Nygren <nygren@mit.edu>
Branches:
master, barnowl_perlaim, debian, owl, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
1354456
Parents:
9bd2c17
Message:
	Modified the behavior of last so that "> >" will clear the screen.
	The new behavior of last is:
	      Moves the pointer to the last message in the view.
	      If we are already at the last message in the view,
	      blanks the screen and moves just past the end of the view
	      so that new messages will appear starting at the top
	      of the screen.
	Fixed a typo in the help for smartzpunt.
	Fixed functions to handle curmsg being past the end of the view.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • mainwin.c

    rf2e36b5 r5eeea3b  
    1010void owl_mainwin_redisplay(owl_mainwin *mw) {
    1111  owl_message *m;
    12   int i, j, p, q, lines, isfull;
     12  int i, p, q, lines, isfull, viewsize;
    1313  int x, y, savey, recwinlines, start;
    1414  int topmsg, curmsg, color;
     
    2727  recwinlines=owl_global_get_recwin_lines(&g);
    2828  topmsg=owl_global_get_topmsg(&g);
     29  viewsize=owl_view_get_size(v);
    2930
    30   /* if there are no messages, just draw a blank screen */
    31   if (owl_view_get_size(v)==0) {
    32     owl_global_set_topmsg(&g, 0);
     31  /* if there are no messages or if topmsg is past the end of the messages,
     32   * just draw a blank screen */
     33  if (viewsize==0 || topmsg>=viewsize) {
     34    if (viewsize==0) {
     35      owl_global_set_topmsg(&g, 0);
     36    }
    3337    mw->curtruncated=0;
    3438    mw->lastdisplayed=-1;
     
    4246  mw->curtruncated=0;
    4347  mw->lasttruncated=0;
    44   j=owl_view_get_size(v);
    45   for (i=topmsg; i<j; i++) {
     48
     49  for (i=topmsg; i<viewsize; i++) {
    4650    if (isfull) break;
    4751    m=owl_view_get_element(v, i);
Note: See TracChangeset for help on using the changeset viewer.