Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression: Image custom object is not properly handled in RichText demo #584

Closed
afester opened this issue Sep 17, 2017 · 3 comments
Closed
Assignees

Comments

@afester
Copy link
Collaborator

afester commented Sep 17, 2017

  • Launch the RichTextDemo
  • Insert an image
  • Place cursor to start of paragraph
  • Press Enter
    => Image is shown twice, once in the upper (new) paragraph and once in the lower paragraph.
    When using an older variant of the LinkedImageOps, it works well.
@afester afester self-assigned this Sep 17, 2017
@afester
Copy link
Collaborator Author

afester commented Sep 17, 2017

Modifying realSubSequence in NodeSegmentOpsBase so that it creates an empty segment when the sub sequence length is 0 fixes it:

    @Override
    public SEG realSubSequence(SEG seg, int start, int end) {
        if (start == end) {
            return createEmpty();
        }
        return seg;
    }

Needs some additional testing before submitting a PR, but I think this should be a safe assumption in any case (and thus should probably be moved to subSequence in SegmentOpsBase)

@JordanMartinez
Copy link
Contributor

This issue no longer arises in #590

@JordanMartinez
Copy link
Contributor

Closed by #590

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants