Skip to content

wrapTextProperty() is temporarily ignored when inserting characters on a long line #1168

@Col-E

Description

@Col-E

Expected Behavior

Given the following code:

CodeArea area = new CodeArea();
area.setWrapText(false);
setCenter(area);

Inserting a long line such as JsonReader json = new JsonReader(new InputStreamReader(Editor.class.getResourceAsStream("/syntax/java.json"))); should remain on a single line. Changing the window size, or inserting additional characters on the line should have the line still occupy one visual line.

Actual Behavior

Upon inserting a character, the line wraps. Any further interaction resets to the expected wrapping behavior.
Deleting characters does not trigger the bug, only insertions.

java_EIh6KOQQx8.mp4

Reproducible Demo

public class Bug extends Application {

 public void start(Stage primaryStage) {
   CodeArea area = new CodeArea();
   area.setWrapText(false); // at runtime, just paste your long text in since its the interaction of insertion by the user that triggers this
   primaryStage.setScene(new Scene(new BorderPane(area)));

   primaryStage.show();
 }

}

Environment info:

  • RichTextFX Version: 0.11.0
  • Operating System: Windows 10
  • Java version: 17

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions