Community
    • Login

    Copy All Formats Truncating

    Scheduled Pinned Locked Moved General Discussion
    2 Posts 1 Posters 2.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Darren SchroederD
      Darren Schroeder
      last edited by

      I mapped my Ctrl-C to “Copy All Formats To Clipboard” method of the NppExport plugin. I’ve noticed that it always misses the last character.

      Example - if I select this entire sentence below and hit Ctrl-C:
      Now is the time for all good men

      When I paste it I get
      Now is the time for all good me

      Is there any way to fix this or a work-around?

      1 Reply Last reply Reply Quote 0
      • Darren SchroederD
        Darren Schroeder
        last edited by

        I fixed this problem by changing the following code in NppExport that I found here https://github.com/chcg/NPP_ExportPlugin.

        TXTExporter::exportData()
        Before:
        int totalBytesNeeded = ed->csd->nrChars;
        After:
        int totalBytesNeeded = ed->csd->nrChars + 1;

        RTFExporter::exportData()
        Before:
        int totalBytesNeeded = 1; //zero terminator
        After:
        int totalBytesNeeded = 2; //zero terminator

        HTMLExporter exportData()
        Before:
        int totalBytesNeeded = 1; //zero terminator
        After:
        int totalBytesNeeded = 2; //zero terminator

        I hope this helps someone.

        Thanks,
        Darren

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors