Changeset 9923144 for history.c


Ignore:
Timestamp:
Jun 25, 2011, 3:24:36 AM (10 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.8, release-1.9
Children:
83a079a
Parents:
43744ce
git-author:
Anders Kaseorg <andersk@mit.edu> (06/22/11 02:41:18)
git-committer:
Anders Kaseorg <andersk@mit.edu> (06/25/11 03:24:36)
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>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • history.c

    r43744ce r9923144  
    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}
Note: See TracChangeset for help on using the changeset viewer.