Changeset fac5463


Ignore:
Timestamp:
Jan 11, 2008, 2:46:52 PM (13 years ago)
Author:
Alejandro R. Sedeño <asedeno@mit.edu>
Branches:
master, barnowl_perlaim, debian, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
cde4a71
Parents:
a827529
Message:
fixing post-processing in the editwin.
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • editwin.c

    r830c36e rfac5463  
    568568  c = g_utf8_get_char(p);
    569569  while (c) {
    570     owl_editwin_process_char(e, c);
     570    _owl_editwin_process_char(e, c);
    571571    p = g_utf8_next_char(p);
    572572    c = g_utf8_get_char(p);
     
    10751075}
    10761076
    1077 void owl_editwin_post_process_char(owl_editwin *e, gunichar j)
     1077void owl_editwin_post_process_char(owl_editwin *e, owl_input j)
    10781078{
    10791079  /* check if we need to scroll down */
     
    10811081    e->topline+=e->winlines/2;
    10821082  }
    1083   if ((j==13 || j==10) && owl_editwin_check_dotsend(e)) {
     1083  if ((j.ch==13 || j.ch==10) && owl_editwin_check_dotsend(e)) {
    10841084    owl_command_editmulti_done(e);
    10851085    return;
     
    10881088}
    10891089
    1090 void owl_editwin_process_char(owl_editwin *e, gunichar j)
    1091 {
    1092   if (j == ERR) return;
    1093   if (g_unichar_iscntrl(j) && (j != 10) && (j != 13)) {
    1094     return;
    1095   }
    1096   else {
     1090void _owl_editwin_process_char(owl_editwin *e, gunichar j)
     1091{
     1092  if (!(g_unichar_iscntrl(j) && (j != 10) && (j != 13))) {
    10971093    owl_editwin_insert_char(e, j);
     1094  }
     1095}
     1096
     1097
     1098void owl_editwin_process_char(owl_editwin *e, owl_input j)
     1099{
     1100  if (j.ch == ERR) return;
     1101  /* Ignore ncurses control characters. */
     1102  if (j.ch < 0x100) {
     1103    _owl_editwin_process_char(e, j.uch);
    10981104  }
    10991105}
  • keys.c

    r428834d rfac5463  
    301301void owl_keys_editwin_default(owl_input j) {
    302302  owl_editwin *e;
    303   if (NULL != (e=owl_global_get_typwin(&g))
    304       && j.ch < 0x100) {
    305        owl_editwin_process_char(e, j.uch);
     303  if (NULL != (e=owl_global_get_typwin(&g))) {
     304       owl_editwin_process_char(e, j);
    306305  }
    307306}
     
    309308void owl_keys_editwin_postalways(owl_input j) {
    310309  owl_editwin *e;
    311   if (NULL != (e=owl_global_get_typwin(&g))
    312       && j.ch < 0x100) {
    313     owl_editwin_post_process_char(e, j.uch);
    314   } 
     310  if (NULL != (e=owl_global_get_typwin(&g))) {
     311    owl_editwin_post_process_char(e, j);
     312  }
    315313  owl_global_set_needrefresh(&g);
    316314}
Note: See TracChangeset for help on using the changeset viewer.