Describe the bug
The more lines are covered with block selection, the slower everything gets.
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 StyledTextBlockSelectionTest {
public static void main(String[] args) {
final Display display = new Display();
final Shell shell = new Shell(display);
shell.setLayout(new FillLayout());
final StyledText st = new StyledText(shell, SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL);
final StringBuilder buffer = new StringBuilder();
for (int i = 0; i < 200; i++) {
buffer.append("line " + i + "\n");
}
st.setText(buffer.toString());
st.setBlockSelection(true);
shell.setSize(800, 400);
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
}
}
display.dispose();
}
}
- hold Shift and Cursor down
-> The first dozens of lines, it works normally fast, then around 50 selected lines it gets noticeable slower, at 150 it gets unusable slow.
Expected behavior
It should continue selecting the lines as quick as with normal selection
Environment:
- Select the platform(s) on which the behavior is seen:
- Additional OS info (e.g. OS version, Linux Desktop, etc)
Tested on Windows 11, but as this control is self-drawn, it likely should reproduce on other platforms
Workaround (or) Additional context
No known workaround.
Describe the bug
The more lines are covered with block selection, the slower everything gets.
To Reproduce
Run this snippet:
-> The first dozens of lines, it works normally fast, then around 50 selected lines it gets noticeable slower, at 150 it gets unusable slow.
Expected behavior
It should continue selecting the lines as quick as with normal selection
Environment:
Tested on Windows 11, but as this control is self-drawn, it likely should reproduce on other platforms
Workaround (or) Additional context
No known workaround.