From 7e5ba6c99324760269392f5ca3937aa7e5fb5976 Mon Sep 17 00:00:00 2001 From: Marcus Tillmanns Date: Tue, 16 May 2023 13:27:29 +0200 Subject: 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 --- src/plugins/terminal/celliterator.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/terminal/celliterator.cpp b/src/plugins/terminal/celliterator.cpp index d81c4b7187..91a70f76ea 100644 --- a/src/plugins/terminal/celliterator.cpp +++ b/src/plugins/terminal/celliterator.cpp @@ -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) -- cgit v1.2.1