diff --git a/src/debugger/gui/TiaOutputWidget.cxx b/src/debugger/gui/TiaOutputWidget.cxx index 033c7caa7..b7fce2c16 100644 --- a/src/debugger/gui/TiaOutputWidget.cxx +++ b/src/debugger/gui/TiaOutputWidget.cxx @@ -121,7 +121,11 @@ void TiaOutputWidget::handleCommand(CommandSender* sender, int cmd, int data, in ostringstream command; int lines = myClickY + ystart; if(instance().console().tia().isRendering()) + { lines -= instance().console().tia().scanlines(); + if(lines < 0) + lines += instance().console().tia().scanlinesLastFrame(); + } if(lines > 0) { command << "scanline #" << lines;