Changeset bd783db


Ignore:
Timestamp:
May 12, 2009, 11:39:44 PM (12 years ago)
Author:
Alejandro R. Sedeño <asedeno@mit.edu>
Branches:
master, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
3d08168
Parents:
70110286
Message:
Error on swap when mark has not been set.
Also, initialize the mark and drop a global member that I didn't use.
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • functions.c

    r70110286 rbd783db  
    35633563  owl_view *v;
    35643564
     3565  marked_id=owl_global_get_markedmsgid(&g);
     3566  if (marked_id == -1) {
     3567    owl_function_error("Mark not set.");
     3568    return;
     3569  }
     3570
    35653571  v=owl_global_get_current_view(&g);
    35663572  /* bail if there's no current message */
     
    35683574    return;
    35693575  }
     3576
    35703577  m=owl_view_get_element(v, owl_global_get_curmsg(&g));
    3571   marked_id=owl_global_get_markedmsgid(&g);
    3572 
    35733578  _owl_function_mark_message(m);
    3574 
    35753579  owl_global_set_curmsg(&g, owl_view_get_nearest_to_msgid(v, marked_id));
    35763580  owl_mainwin_redisplay(owl_global_get_mainwin(&g));
  • global.c

    r70110286 rbd783db  
    3535  g->curmsg=0;
    3636  g->topmsg=0;
     37  g->markedmsgid=-1;
    3738  g->needrefresh=1;
    3839  g->startupargs=NULL;
  • owl.h

    r70110286 rbd783db  
    535535  owl_errqueue errqueue;
    536536  int lines, cols;
    537   int curmsg, topmsg, markedmsg;
     537  int curmsg, topmsg;
    538538  int markedmsgid;              /* for finding the marked message when it has moved. */
    539539  int curmsg_vert_offset;
Note: See TracChangeset for help on using the changeset viewer.