mirror of
https://github.com/elisspace/autopsy.git
synced 2026-09-06 02:24:30 +00:00
text view use only up to 1024 chars to detect text direction
This commit is contained in:
@@ -356,8 +356,10 @@ class ExtractedContentPanel extends javax.swing.JPanel {
|
||||
text = "";
|
||||
}
|
||||
|
||||
//detect text direction and set it
|
||||
extractedTextPane.applyComponentOrientation(TextUtil.getTextDirection(text));
|
||||
//detect text direction using first 1024 chars and set it
|
||||
final int maxOrientChars = Math.min(text.length(), 1024);
|
||||
final String orientDetectText = text.substring(0, maxOrientChars);
|
||||
extractedTextPane.applyComponentOrientation(TextUtil.getTextDirection(orientDetectText));
|
||||
|
||||
extractedTextPane.setText(text);
|
||||
extractedTextPane.setCaretPosition(0);
|
||||
|
||||
Reference in New Issue
Block a user