message: [contour] TerminalWidget: Should fix synchronization issue with the scrollbar.
diff: @@ -1617,11 +1617,22 @@ void TerminalWidget::onSelectionComplete()
  }
  void TerminalWidget::bufferChanged(terminal::ScreenType)
  +{
  + post([this] ()
  {
  setDefaultCursor();
  + if (terminalView_->terminal().screen().isPrimaryScreen())
  + scrollBar_->setMaximum(terminalView_->terminal().screen().historyLineCount());
  + else
  + scrollBar_->setMaximum(0);
  +
  updateScrollBarPosition();
  updateScrollBarValue();
  + });
  +
  + if (setScreenDirty())
  + update();
  }
  void TerminalWidget::screenUpdated()
  @@ -1632,23 +1643,20 @@ void TerminalWidget::screenUpdated()
  // terminalMetrics_(command);
  #endif
  - if (profile().autoScrollOnUpdate && terminalView_->terminal().viewport().scrolled())
  - terminalView_->terminal().viewport().scrollToBottom();
  -
  if (terminalView_->terminal().screen().isPrimaryScreen())
  - scrollBar_->setMaximum(terminalView_->terminal().screen().historyLineCount());
  - else
  - scrollBar_->setMaximum(0);
  -
  - //post([this]()
  {
  + post([this]()
  + {
  + scrollBar_->setMaximum(terminalView_->terminal().screen().historyLineCount());
  + if (profile().autoScrollOnUpdate && terminalView_->terminal().viewport().scrolled())
  + terminalView_->terminal().viewport().scrollToBottom();
  updateScrollBarValue();
  + });
  + }
  if (setScreenDirty())
  update(); //QCoreApplication::postEvent(this, new QEvent(QEvent::UpdateRequest));
  }
  - //);
  -}
  void TerminalWidget::updateScrollBarValue()
  {
  