diff options
author | Andrzej Rybczak <electricityispower@gmail.com> | 2015-09-09 19:12:57 +0200 |
---|---|---|
committer | Andrzej Rybczak <electricityispower@gmail.com> | 2015-09-09 19:12:57 +0200 |
commit | 71fa345280a4fd231ef441e55b3886aa667839ed (patch) | |
tree | 9a62e8800b449c2ad7d38c79c557edb94e699fec /src/helpers.cpp | |
parent | b9a0608053723d2ceb43f008bf3513b9651a1a12 (diff) |
strbuffer: fix issue with order of properties with the same position
Diffstat (limited to 'src/helpers.cpp')
-rw-r--r-- | src/helpers.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/helpers.cpp b/src/helpers.cpp index 52988025..bd9b93a8 100644 --- a/src/helpers.cpp +++ b/src/helpers.cpp @@ -205,21 +205,21 @@ void writeCyclicBuffer(const NC::WBuffer &buf, NC::Window &w, size_t &start_pos, auto p = ps.begin(); // load attributes from before starting pos - for (; p != ps.end() && p->position() < start_pos; ++p) - w << *p; + for (; p != ps.end() && p->first < start_pos; ++p) + w << p->second; auto write_buffer = [&](size_t start) { for (size_t i = start; i < s.length() && len < width; ++i) { - for (; p != ps.end() && p->position() == i; ++p) - w << *p; + for (; p != ps.end() && p->first == i; ++p) + w << p->second; len += wcwidth(s[i]); if (len > width) break; w << s[i]; } for (; p != ps.end(); ++p) - w << *p; + w << p->second; p = ps.begin(); }; |