editor: fix border-case when finding prev bookmark

A typo made the finding of the previous bookmark when the current
row is located after the last bookmark to fail. Fix this by
replacing a call to std::set<int>::rend() with a call to
std::set<int>::rbegin().
This commit is contained in:
Erik Faye-Lund 2012-04-16 18:40:49 +02:00
parent 3f19324255
commit b1d3320415

View File

@ -299,7 +299,7 @@ public:
{
std::set<int>::const_iterator it = rowBookmarks.lower_bound(row);
if (it == rowBookmarks.end()) {
std::set<int>::const_reverse_iterator it = rowBookmarks.rend();
std::set<int>::const_reverse_iterator it = rowBookmarks.rbegin();
if (it == rowBookmarks.rend())
return -1;
return *it;