Changeset 7086a20


Ignore:
Timestamp:
Jun 22, 2011, 3:36:48 AM (13 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Children:
57a66fe
Parents:
87ab6e5
git-author:
Anders Kaseorg <andersk@mit.edu> (06/22/11 02:41:18)
git-committer:
Anders Kaseorg <andersk@mit.edu> (06/22/11 03:36:48)
Message:
history: Get rid of touched and associated bug

This fixes the following bug: type a partial line, up, down, type the
rest of the line, up, down; oops, we’re back to the first partial
line.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • history.c

    r87ab6e5 r7086a20  
    55  owl_list_create(&(h->hist));
    66  h->cur=0;                     /* current position in history */
    7   h->touched=0;                 /* whether we've gone into history */
    87  h->partial=0;                 /* is the 0th element is partially composed? */
    98}
     
    1312
    1413  if (!h) return NULL;
    15   h->touched=1;
    1614
    1715  if (owl_list_get_size(&(h->hist))==0) return(NULL);
     
    7674  if (!h) return;
    7775  h->cur=0;
    78   h->touched=0;
    7976  h->partial=0;
    8077}
     
    8380{
    8481  if (!h) return(0);
    85   if (h->touched) return(1);
    86   return(0);
     82  return h->cur > 0;
    8783}
  • owl.h

    r87ab6e5 r7086a20  
    457457  owl_list hist;
    458458  int cur;
    459   int touched;
    460459  int partial;
    461460} owl_history;
Note: See TracChangeset for help on using the changeset viewer.