- Timestamp:
- Feb 19, 2008, 6:10:18 PM (17 years ago)
- Branches:
- master, barnowl_perlaim, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 1951db8, 61abb18
- Parents:
- 18108b1e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
owl.c
r9c7a701 r4cc0ee0b 61 61 #endif 62 62 63 #define STDIN 064 65 63 static const char fileIdent[] = "$Id$"; 66 64 … … 212 210 { 213 211 owl_dispatch *d = owl_malloc(sizeof(owl_dispatch)); 214 d->fd = STDIN;212 d->fd = fileno(stdin); 215 213 d->cfunc = &owl_process_input; 216 214 d->pfunc = NULL; … … 528 526 owl_function_set_cursor(sepwin); 529 527 } 528 owl_function_debugmsg("owl.c -- doupdate()"); 530 529 doupdate(); 531 530 owl_global_set_noneedrefresh(&g); … … 675 674 owl_editwin *tw; 676 675 677 j = wgetch(owl_global_get_curs_typwin(&g)); 678 if (j == ERR) return; 679 680 owl_global_set_lastinputtime(&g, time(NULL)); 681 pw=owl_global_get_popwin(&g); 682 tw=owl_global_get_typwin(&g); 683 684 /* find and activate the current keymap. 685 * TODO: this should really get fixed by activating 686 * keymaps as we switch between windows... 687 */ 688 if (pw && owl_popwin_is_active(pw) && owl_global_get_viewwin(&g)) { 689 owl_context_set_popless(owl_global_get_context(&g), 690 owl_global_get_viewwin(&g)); 691 owl_function_activate_keymap("popless"); 692 } else if (owl_global_is_typwin_active(&g) 693 && owl_editwin_get_style(tw) == OWL_EDITWIN_STYLE_ONELINE) { 694 /* 695 owl_context_set_editline(owl_global_get_context(&g), tw); 696 owl_function_activate_keymap("editline"); 697 */ 698 } else if (owl_global_is_typwin_active(&g) 699 && owl_editwin_get_style(tw) == OWL_EDITWIN_STYLE_MULTILINE) { 700 owl_context_set_editmulti(owl_global_get_context(&g), tw); 701 owl_function_activate_keymap("editmulti"); 702 } else { 703 owl_context_set_recv(owl_global_get_context(&g)); 704 owl_function_activate_keymap("recv"); 705 } 706 /* now actually handle the keypress */ 707 ret = owl_keyhandler_process(owl_global_get_keyhandler(&g), j); 708 if (ret != 0 && ret != 1) { 709 owl_function_makemsg("Unable to handle keypress"); 676 while (1) { 677 j = wgetch(owl_global_get_curs_typwin(&g)); 678 if (j == ERR) return; 679 680 owl_global_set_lastinputtime(&g, time(NULL)); 681 pw=owl_global_get_popwin(&g); 682 tw=owl_global_get_typwin(&g); 683 684 /* find and activate the current keymap. 685 * TODO: this should really get fixed by activating 686 * keymaps as we switch between windows... 687 */ 688 if (pw && owl_popwin_is_active(pw) && owl_global_get_viewwin(&g)) { 689 owl_context_set_popless(owl_global_get_context(&g), 690 owl_global_get_viewwin(&g)); 691 owl_function_activate_keymap("popless"); 692 } else if (owl_global_is_typwin_active(&g) 693 && owl_editwin_get_style(tw) == OWL_EDITWIN_STYLE_ONELINE) { 694 /* 695 owl_context_set_editline(owl_global_get_context(&g), tw); 696 owl_function_activate_keymap("editline"); 697 */ 698 } else if (owl_global_is_typwin_active(&g) 699 && owl_editwin_get_style(tw) == OWL_EDITWIN_STYLE_MULTILINE) { 700 owl_context_set_editmulti(owl_global_get_context(&g), tw); 701 owl_function_activate_keymap("editmulti"); 702 } else { 703 owl_context_set_recv(owl_global_get_context(&g)); 704 owl_function_activate_keymap("recv"); 705 } 706 /* now actually handle the keypress */ 707 ret = owl_keyhandler_process(owl_global_get_keyhandler(&g), j); 708 if (ret != 0 && ret != 1) { 709 owl_function_makemsg("Unable to handle keypress"); 710 } 710 711 } 711 712 }
Note: See TracChangeset
for help on using the changeset viewer.