Skip to content
Commit 2a78bb6e authored by Luis Javier Merino's avatar Luis Javier Merino Committed by Tomaz Canabrava
Browse files

Fix crash/warn on history reflow

When the last line in history was marked as wrapped, the history reflow
algorithm could try to make an out-of-bound access.

These were found via repeteadly zooming-in and out in the amp.rs editor
(available through Rust's cargo tool).  amp.rs writes in the normal
buffer (not in the alternate buffer).

While at it, add a Q_ASSERT in HistoryScrollFile::startOfLine() to
ensure parameters are in range.  Note that after an addCells()/addLine()
pair, HistoryScrollFile::startOfLine(getLines) always has the same value
as _cells.len().

BUG: 436916
parent 1d58aae6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment