Skip to content

Conversation

@andy-goryachev-oracle
Copy link
Contributor

@andy-goryachev-oracle andy-goryachev-oracle commented Oct 20, 2025

RichTextArea.Tag.SELECT_PARAGRAPH or RichTextArea.selectParagraph() must include the trailing line separator (if present).

This is a behavioral change, but a simple one (an obvious bug) - maybe one reviewer is sufficient. I don't think this needs a CSR.

Some interdependency exists between this PR and #1944.
Depending which gets integrated first, changes in tests will be needed.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8369085: RichTextArea SELECT_PARAGRAPH to include line separator (Bug - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jfx.git pull/1940/head:pull/1940
$ git checkout pull/1940

Update a local copy of the PR:
$ git checkout pull/1940
$ git pull https://git.openjdk.org/jfx.git pull/1940/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1940

View PR using the GUI difftool:
$ git pr show -t 1940

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/1940.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 20, 2025

👋 Welcome back angorya! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Oct 20, 2025

@andy-goryachev-oracle This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8369085: RichTextArea SELECT_PARAGRAPH to include line separator

Reviewed-by: kcr

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been no new commits pushed to the master branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@andy-goryachev-oracle andy-goryachev-oracle marked this pull request as ready for review October 20, 2025 21:47
@openjdk openjdk bot added the rfr Ready for review label Oct 20, 2025
@mlbridge
Copy link

mlbridge bot commented Oct 20, 2025

Webrevs

Copy link
Member

@kevinrushforth kevinrushforth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that this doesn't need a CSR. It seems a simple enough fix, but if @Ziad-Mid could test it that would help (or you can wait for me or @arapte to do it).

int ix = p.index();
TextPos an = TextPos.ofLeading(ix, 0);
TextPos ca = control.getParagraphEnd(ix);
TextPos ca = TextPos.ofLeading(ix + 1, 0);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this work if you select the last paragraph in the RTA? You'll be calling TextPos.ofLeading with a paragraph index that is out of range, but maybe it handles it?

I see you added a test for just this case. Good.

@kevinrushforth kevinrushforth self-requested a review October 23, 2025 15:14
Copy link
Member

@kevinrushforth kevinrushforth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. The newly added test fails without the fix and passes with the fix. Also, it does what I expect in MonkeyTester.

@kevinrushforth
Copy link
Member

This is a simple enough fix that a single reviewer is sufficient.

@openjdk openjdk bot added the ready Ready to be integrated label Oct 23, 2025
@andy-goryachev-oracle
Copy link
Contributor Author

thank you!
/integrate

@openjdk
Copy link

openjdk bot commented Oct 23, 2025

Going to push as commit 42fd4eb.

@openjdk openjdk bot added the integrated Pull request has been integrated label Oct 23, 2025
@openjdk openjdk bot closed this Oct 23, 2025
@openjdk openjdk bot removed ready Ready to be integrated rfr Ready for review labels Oct 23, 2025
@openjdk
Copy link

openjdk bot commented Oct 23, 2025

@andy-goryachev-oracle Pushed as commit 42fd4eb.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@andy-goryachev-oracle andy-goryachev-oracle deleted the 8369085.select.par branch October 23, 2025 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

2 participants