If the highlighted line did not move outside of the visible region, it should not be necessary to update idx_last. CID #1287137, #1287138.