Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • editwin.c

    r6c171f1 r2184001  
    326326static void oe_release_excursion(owl_editwin *e, oe_excursion *x)
    327327{
    328   oe_excursion **px;
     328  oe_excursion *p;
    329329
    330330  x->valid = 0;
    331   for (px = &e->excursions; *px != NULL; px = &(*px)->next)
    332     if (*px == x) {
    333       *px = x->next;
    334       return;
    335     }
    336   abort();
     331  if (e->excursions == NULL)
     332    /* XXX huh. */ ;
     333  else if (e->excursions == x)
     334    e->excursions = x->next;
     335  else {
     336    for (p = e->excursions; p->next != NULL; p = p->next)
     337      if (p->next == x) {
     338        p->next = p->next->next;
     339        break;
     340      }
     341    /* and if we ran off the end? XXX */
     342  }
    337343}
    338344
     
    12521258
    12531259  if (!g_unichar_iscntrl(c) || c == '\n' || c== '\t' ) {
     1260    memset(tmp, 0, 7);
     1261
    12541262    if (c == '\n' && e->style == OWL_EDITWIN_STYLE_ONELINE) {
    12551263      return;
     
    12941302      return; /* our work here is done */
    12951303
    1296     tmp[g_unichar_to_utf8(c, tmp)] = '\0';
     1304    g_unichar_to_utf8(c, tmp);
    12971305    owl_editwin_replace(e, 0, tmp);
    12981306  }
Note: See TracChangeset for help on using the changeset viewer.