Copy All Formats Truncating
-
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 menWhen I paste it I get
Now is the time for all good meIs there any way to fix this or a work-around?
-
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 terminatorHTMLExporter exportData()
Before:
int totalBytesNeeded = 1; //zero terminator
After:
int totalBytesNeeded = 2; //zero terminatorI hope this helps someone.
Thanks,
Darren
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login