Describe the bug
Resizing a shell with a StyledText control leaves paint artifacts.
To Reproduce
Run this snippet:
import org.eclipse.swt.*;
import org.eclipse.swt.custom.*;
import org.eclipse.swt.layout.*;
import org.eclipse.swt.widgets.*;
public class StyledTextExample {
public static void main(String[] args) {
final Display display = new Display();
final Shell shell = new Shell(display);
shell.setLayout(new FillLayout());
final StyledText styledText = new StyledText(shell, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL | SWT.MULTI);
styledText.setText("line 1\nline 2\nline 3\nline 4\n");
shell.setSize(400, 300);
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
}
}
display.dispose();
}
}
and resize the shell to become larger.
Expected behavior
There must not be repaint artifacts.
Screenshots
Initial display (Windows 11, 175% zoom):

After resizing a little bit:

Environment:
- Select the platform(s) on which the behavior is seen:
Describe the bug
Resizing a shell with a
StyledTextcontrol leaves paint artifacts.To Reproduce
Run this snippet:
and resize the shell to become larger.
Expected behavior
There must not be repaint artifacts.
Screenshots

Initial display (Windows 11, 175% zoom):
After resizing a little bit:

Environment: