Navigation

    Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Copy All Formats Truncating

    General Discussion
    1
    2
    1720
    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 Schroeder
      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 Schroeder
        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
        Copyright © 2014 NodeBB Forums | Contributors