mirror of
https://github.com/mawww/kakoune.git
synced 2024-11-28 09:07:19 +03:00
fix DisplayBuffer::atom_containing when where is before first atom
This commit is contained in:
parent
ebe945f344
commit
dd7228b098
@ -93,6 +93,9 @@ DisplayBuffer::iterator DisplayBuffer::atom_containing(const BufferIterator& whe
|
||||
DisplayBuffer::iterator DisplayBuffer::atom_containing(const BufferIterator& where,
|
||||
iterator start)
|
||||
{
|
||||
if (where < start->begin())
|
||||
return end();
|
||||
|
||||
return std::upper_bound(start, end(), where,
|
||||
[](const BufferIterator& where, const DisplayAtom& atom)
|
||||
{ return where < atom.end(); });
|
||||
|
Loading…
Reference in New Issue
Block a user