Changeset 32c331d


Ignore:
Timestamp:
Jun 25, 2011, 2:23:06 AM (13 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Children:
2bc6bb16
Parents:
7c80ea42
git-author:
Anders Kaseorg <andersk@mit.edu> (06/22/11 03:06:13)
git-committer:
Anders Kaseorg <andersk@mit.edu> (06/25/11 02:23:06)
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

    r7c80ea42 r32c331d  
    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.