Skip to content

Copy formatted text adds extra line(s) and format #593

Closed

Description

@jukzi

Describe the bug
STRG+C a text without linebreaks from an editor
STRG+V into microsoft word or Teams => pastes copied text + one or even two newlines (NOK!)
STRG+V into notepad++ => pastes only the copied text (OK)
STRG+SHIFT+V into microsoft word or Teams => pastes only the copied text (OK)

It's also not helpfull that the whole format is copied at all since the format depends on the current selection -> the copied text is shown ontop of light blue background, only because it was the selected line.

To Reproduce
copy "main" from "public static void main(String[] args)" and paste it with format:
image

Environment:

  1. Select the platform(s) on which the behavior is seen:
    • Windows
    • Linux
    • [?] macOS

Version since
first recognized with 2022-12

Workaround
paste without format (STRG+SHIFT+V)

Activity

  1. jukzi commented on Mar 17, 2023

    @jukzi
    ContributorAuthor

    happens also when all CTRL+C in the key bindings are disabled.

  2. iloveeclipse commented on Mar 17, 2023

    @iloveeclipse
    Member

    I assume this is the effect of #292 ?

  3. jukzi commented on Mar 17, 2023

    @jukzi
    ContributorAuthor

    yes, the newlines are only added when the htmlText is used. the rtfText also has the (bad) format but no additional newlines.

  4. added
    bug
    regression
    on Mar 17, 2023
  5. jukzi commented on Apr 19, 2023

    @jukzi
    ContributorAuthor

    Extra newline for multi-line copy was solved. Copy a "line fragment" still has issue.

  6. added 2 commits that reference this issue on May 16, 2023
    268168b
    58fb474
  7. drapichrust commented on May 26, 2023

    @drapichrust

    @jukzi is it in anyway related to an issue that I see:

    using simple text file on plain eclipse for java

    I put some text to the clipboard via ctrl + c

    I'm creating multi caret selection by using "multi selection down relative to anchor selection" (alt + j in my case) multiple times. Now depending on how many carets I have if I click ctrl + v the pasted text is multiplied by the amount of carets. 2 carets will give me double insertion per caret, 4 will give me 4 per caret (16).

    What is weird is that if I make selection first via ctrl + j and then copy text and paste I only get one insertion per caret.

  8. added a commit that references this issue on Jun 8, 2023
    9b2d8ee
  9. added a commit that references this issue on Jun 9, 2023
    c52bbeb
  10. added a commit that references this issue on Jun 9, 2023
    abe2268
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugregression

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions