Changeset 5a9f6fe


Ignore:
Timestamp:
Nov 5, 2003, 10:48:32 AM (17 years ago)
Author:
James M. Kretchmar <kretch@mit.edu>
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:
cb78880
Parents:
3c7d007a
Message:
Command history now doesn't allow the most recent entry to be repeated
If format_msg returns "" print "<unformatted message>"
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    r97cd00be r5a9f6fe  
    11$Id$
     2
     32.0.13-pre-4
     4        Command history now doesn't allow the last entry
     5           to be repeated
     6        If format_msg returns "" print "<unformatted message>"
    27
    382.0.12-pre-3
  • global.c

    rc7041b3 r5a9f6fe  
    7575  owl_history_init(&(g->msghist));
    7676  owl_history_init(&(g->cmdhist));
    77   /* owl_history_set_norepeats(&(g->cmdhist)); */
     77  owl_history_set_norepeats(&(g->cmdhist));
    7878  g->nextmsgid=0;
    7979
  • history.c

    r3c7d007a r5a9f6fe  
    5353  size=owl_list_get_size(&(h->hist));
    5454
    55   /* if repeats are disallowed, check if the line is present already */
    56   if (!h->repeats) {
    57     for (i=0; i<size; i++) {
    58       if (!strcmp(line, owl_list_get_element(&(h->hist), i))) return;
    59     }
    60   }
    61 
    6255  /* if partial is set, remove the first entry first */
    6356  if (h->partial) {
    6457    owl_list_remove_element(&(h->hist), 0);
     58  }
     59
     60  /* if repeats are disallowed, check if the line is the same as the last */
     61  if (owl_list_get_size(&(h->hist))>0) {
     62    if (!strcmp(line, owl_list_get_element(&(h->hist), 0))) return;
    6563  }
    6664
  • owl.h

    r252a5c2 r5a9f6fe  
    1919static const char owl_h_fileIdent[] = "$Id$";
    2020
    21 #define OWL_VERSION         2.0.12-pre-3
    22 #define OWL_VERSION_STRING "2.0.12-pre-3"
     21#define OWL_VERSION         2.0.12-pre-4
     22#define OWL_VERSION_STRING "2.0.12-pre-4"
    2323
    2424/* Feature that is being tested to redirect stderr through a pipe.
  • style.c

    ra7a42b9 r5a9f6fe  
    5959    /* run the perl function */
    6060    body=owl_perlconfig_getmsg(m, 1, s->perlfuncname);
     61    if (!strcmp(body, "")) {
     62      owl_free(body);
     63      body=owl_strdup("<unformatted message>");
     64    }
    6165   
    6266    /* indent and ensure ends with a newline */
Note: See TracChangeset for help on using the changeset viewer.