YaguraExtender icon indicating copy to clipboard operation
YaguraExtender copied to clipboard

JTranscoderのOutputがWord境界の折り返しになる

Open raise-isayan opened this issue 3 years ago • 1 comments

どうもRSyntaxTextAreaのバグらしく以下のコードで再現する。

import java.awt.BorderLayout;
import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea;
import org.fife.ui.rtextarea.RTextScrollPane;

import javax.swing.*;

public class WrapText {
    public static void main( String[] args ) throws Exception {
        SwingUtilities.invokeAndWait(()->{
            RSyntaxTextArea textArea = new RSyntaxTextArea("r-syntax with a long line that should wrap xxxxxxxxx yyyyyyyyy",3,10);
            textArea.setLineWrap(true);
            textArea.setWrapStyleWord(false);
            RTextScrollPane scroll = new  RTextScrollPane(textArea);
            JPanel panel = new JPanel(new BorderLayout());
            panel.add(scroll, BorderLayout.CENTER);
            JFrame frame = new JFrame("test line wrap");
            frame.setContentPane(panel);
            frame.pack();
            frame.setVisible(true);
        });
    }
}

以下のように折り返しがおかしい

WardWrap

raise-isayan avatar Jan 20 '21 13:01 raise-isayan