Changeset 70110286
- Timestamp:
- May 12, 2009, 11:25:10 PM (15 years ago)
- Branches:
- master, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- bd783db
- Parents:
- e1b136bf
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
commands.c
r790ab12 r70110286 336 336 OWLCMD_VOID("recv:pageup", owl_function_mainwin_pageup, OWL_CTX_INTERACTIVE, 337 337 "scrolls up by a page", "", ""), 338 339 OWLCMD_VOID("recv:mark", owl_function_mark_message, 340 OWL_CTX_INTERACTIVE, 341 "mark the current message", "", ""), 342 343 OWLCMD_VOID("recv:swapmark", owl_function_swap_cur_marked, 344 OWL_CTX_INTERACTIVE, 345 "swap curmsg and mark", "", ""), 338 346 339 347 OWLCMD_INT ("recv:scroll", owl_function_page_curmsg, OWL_CTX_INTERACTIVE, -
functions.c
r0cb6c26 r70110286 3532 3532 sigprocmask(SIG_UNBLOCK, &intr, oldmask); 3533 3533 } 3534 3535 void _owl_function_mark_message(owl_message *m) 3536 { 3537 if (m) 3538 owl_global_set_markedmsgid(&g, owl_message_get_id(m)); 3539 } 3540 3541 void owl_function_mark_message() 3542 { 3543 owl_message *m; 3544 owl_view *v; 3545 3546 v=owl_global_get_current_view(&g); 3547 3548 /* bail if there's no current message */ 3549 if (owl_view_get_size(v) < 1) { 3550 owl_function_error("No messages to mark"); 3551 return; 3552 } 3553 3554 /* mark the message */ 3555 m=owl_view_get_element(v, owl_global_get_curmsg(&g)); 3556 _owl_function_mark_message(m); 3557 } 3558 3559 void owl_function_swap_cur_marked() 3560 { 3561 int marked_id; 3562 owl_message *m; 3563 owl_view *v; 3564 3565 v=owl_global_get_current_view(&g); 3566 /* bail if there's no current message */ 3567 if (owl_view_get_size(v) < 1) { 3568 return; 3569 } 3570 m=owl_view_get_element(v, owl_global_get_curmsg(&g)); 3571 marked_id=owl_global_get_markedmsgid(&g); 3572 3573 _owl_function_mark_message(m); 3574 3575 owl_global_set_curmsg(&g, owl_view_get_nearest_to_msgid(v, marked_id)); 3576 owl_mainwin_redisplay(owl_global_get_mainwin(&g)); 3577 owl_global_set_direction_downwards(&g); 3578 } -
global.c
r0cb6c26 r70110286 199 199 } 200 200 201 /* markedmsgid */ 202 203 int owl_global_get_markedmsgid(owl_global *g) { 204 return(g->markedmsgid); 205 } 206 207 void owl_global_set_markedmsgid(owl_global *g, int i) { 208 g->markedmsgid=i; 209 /* i; index of message in the current view. 210 owl_message *m; 211 owl_view *v; 212 213 v = owl_global_get_current_view(&g); 214 m = owl_view_get_element(v, i); 215 g->markedmsgid = m ? owl_message_get_id(m) : 0; 216 */ 217 } 218 201 219 /* windows */ 202 220 -
keys.c
rce56149 r70110286 263 263 BIND_CMD("M-v", "recv:pageup", ""); 264 264 BIND_CMD("PPAGE", "recv:pageup", ""); 265 BIND_CMD("C-@", "recv:mark", ""); 266 BIND_CMD("C-x C-x", "recv:swapmark", ""); 265 267 266 268 BIND_CMD("SPACE", "recv:scroll 10", "scroll message down a page"); -
owl.h
re1b136bf r70110286 535 535 owl_errqueue errqueue; 536 536 int lines, cols; 537 int curmsg, topmsg; 537 int curmsg, topmsg, markedmsg; 538 int markedmsgid; /* for finding the marked message when it has moved. */ 538 539 int curmsg_vert_offset; 539 540 owl_view current_view;
Note: See TracChangeset
for help on using the changeset viewer.