fix - stale code block height during incremental chat layout#343
Conversation
There was a problem hiding this comment.
Pull request overview
This PR improves chat code-block layout stability by ensuring SourceViewerComposite reports an up-to-date height synchronously (via computeSize(...)), reducing the chance that incremental chat layout caches stale code-block heights while async setBounds(...) is pending.
Changes:
- Override
computeSize(...)inSourceViewerCompositeto measure height directly from the currentStyledTextcontent. - Factor out a shared
getSourceViewerHeight(...)helper and reuse it inrefreshScrollerLayout()for consistent scrollbar-height handling.
The issue was caused by the new I updated the sizing logic to convert the measured |


Summary
computeSize(...)override forSourceViewerCompositeso code block height is measured synchronously from the currentStyledTextcontent.setBounds(...).