Skip to content
  • Luis Javier Merino's avatar
    [CompactHistory] store biased starts of lines · 1d5e8683
    Luis Javier Merino authored and Tomaz  Canabrava's avatar Tomaz Canabrava committed
    Using line lengths, moving up in scroll history would require traversing
    line lengths adding them until getting the start of the required line.
    Using line starts, removing lines as they scroll past history would
    require traversing the whole vector and updating the line starts.  A
    better option is storing biased line starts, which doesn't require any
    traversing of the vector for common operations (hopefully reflowing is
    not a common operation).
    1d5e8683