Terminal: Fix CellIterator again

The updateChar() was only called when m_pos == 0. It needs to be called
unless m_state == End though.

Change-Id: I2c9a7c151420395d18f2846705d57129d7afc5f3
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
Marcus Tillmanns
2023-05-16 13:27:29 +02:00
parent 671621d79b
commit 7e5ba6c993

View File

@@ -22,10 +22,12 @@ CellIterator::CellIterator(const TerminalSurface *surface, int pos)
if (m_pos == 0) {
m_state = State::BEGIN;
updateChar();
} else if (m_pos == m_maxpos + 1) {
m_state = State::END;
}
if (m_state != State::END)
updateChar();
}
CellIterator::CellIterator(const TerminalSurface *surface)