Changeset 8e515f9


Ignore:
Timestamp:
Jun 25, 2011, 3:24:36 AM (6 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.8, release-1.9
Children:
95b52d1
Parents:
b470451
git-author:
Anders Kaseorg <andersk@mit.edu> (06/22/11 03:06:13)
git-committer:
Anders Kaseorg <andersk@mit.edu> (06/25/11 03:24:36)
Message:
history: Do not deduplicate a partial entry

This fixes a bug that let you to remove the last item from your
history by typing it again, pressing up and down, and erasing it.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • history.c

    rb470451 r8e515f9  
    4646
    4747  /* check if the line is the same as the last */
    48   if (owl_list_get_size(&(h->hist))>0) {
    49     if (!strcmp(line, owl_list_get_element(&(h->hist), 0))) return;
    50   }
     48  if (!partial && owl_list_get_size(&(h->hist)) > 0 &&
     49      strcmp(line, owl_list_get_element(&(h->hist), 0)) == 0)
     50    return;
    5151
    5252  /* if we've reached the max history size, pop off the last element */
Note: See TracChangeset for help on using the changeset viewer.