Changeset 59cf91c for functions.c
- Timestamp:
- Aug 17, 2002, 1:21:17 PM (21 years ago)
- Branches:
- master, barnowl_perlaim, debian, owl, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 67103d4
- Parents:
- 37c27cf
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
functions.c
r37c27cf r59cf91c 1667 1667 owl_view *v; 1668 1668 owl_filter *f; 1669 int curid=-1, newpos; 1670 owl_message *curm; 1669 1671 1670 1672 v=owl_global_get_current_view(&g); 1673 curm=owl_view_get_element(v, owl_global_get_curmsg(&g)); 1674 if (curm) { 1675 curid = owl_message_get_id(curm); 1676 owl_view_save_curmsgid(v, curid); 1677 } 1678 1671 1679 f=owl_global_get_filter(&g, filtname); 1672 1680 if (!f) { … … 1678 1686 owl_view_create(v, f); 1679 1687 1680 owl_global_set_curmsg(&g, 0); 1688 /* Figure out where to set the current message to. 1689 * - If the previous view had messages in it, go to the closest message 1690 * to the last message in that view. 1691 * - If the previous view was empty, attempts to restore the position 1692 * from the last time we were in that view. */ 1693 if (curm) { 1694 newpos = owl_view_get_nearest_to_msgid(v, curid); 1695 } else { 1696 newpos = owl_view_get_nearest_to_saved(v); 1697 } 1698 1699 owl_global_set_curmsg(&g, newpos); 1700 1681 1701 owl_global_set_curmsg_vert_offset(&g, 0); 1682 1702 owl_global_set_direction_downwards(&g);
Note: See TracChangeset
for help on using the changeset viewer.