• Luis Javier Merino's avatar
    Fix scroll position jumps regression · a6fce70f
    Luis Javier Merino authored
    Commit d37d3ac1 "CompactHistoryScroll: Remove _maxLineCount + 5 lines at
    a time" caused a regression: addHistLine queried the number of lines in
    history before and after adding a line, and if it had not incremented it
    assumed one line entered history and another was dropped at the other
    end.  Now, lines are dropped from history in batches, so take care of
    that.
    
    Very similar to the regression fixed at 7a1e4768, only this one is about
    keeping the scroll position on the presence of scroll, and that other
    one is about keeping the selection.
    
    Thanks to the bug reporters Michael and Luke-Jr for the heads-up.
    
    BUG: 452955
    BUG: 453112
    (cherry picked from commit d2ca202a)
    a6fce70f