fix(layout): grow styles without contiguous reallocations

This commit is contained in:
2026-08-08 13:25:42 -04:00
parent 4568f56f92
commit 94ff3c5ca5
+2 -1
View File
@@ -15,6 +15,7 @@
#include <cstddef>
#include <cstdint>
#include <cstring>
#include <deque>
#include <utility>
#include <vector>
@@ -370,7 +371,7 @@ public:
private:
std::vector<uint16_t> labelAt;
std::vector<char> labels;
std::vector<std::pair<uint16_t, Style>> styles;
std::deque<std::pair<uint16_t, Style>> styles;
// Linear rather than the sorted search styles use: a screen has one or two
// scroll containers, so the binary search would cost more than the scan.
std::vector<std::pair<uint16_t, Scroll>> scrollState;