Window: fix blink_void
This commit is contained in:
parent
834e2d2fe3
commit
e351acd997
|
@ -12,6 +12,7 @@ DisplayBuffer::DisplayBuffer()
|
|||
DisplayBuffer::iterator DisplayBuffer::split(iterator atom, size_t pos_in_atom)
|
||||
{
|
||||
assert(atom < end());
|
||||
assert(pos_in_atom > 0);
|
||||
assert(pos_in_atom < atom->content.length());
|
||||
DisplayAtom new_atom(atom->begin, atom->begin + pos_in_atom,
|
||||
atom->content.substr(0, pos_in_atom),
|
||||
|
|
|
@ -114,7 +114,9 @@ static void blink_void(DisplayBuffer& display_buffer)
|
|||
size_t pos = atom_it->content.find("void");
|
||||
if (pos != std::string::npos)
|
||||
{
|
||||
atom_it = display_buffer.split(atom_it, pos) + 1;
|
||||
if (pos != 0)
|
||||
atom_it = display_buffer.split(atom_it, pos) + 1;
|
||||
|
||||
atom_it = display_buffer.split(atom_it, 4);
|
||||
atom_it->attribute |= Attributes::Blink;
|
||||
++atom_it;
|
||||
|
|
Loading…
Reference in New Issue
Block a user