Summary: | app-text/mupdf-0.9 copy adds a newline character | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Horst Prote <prote> |
Component: | Current packages | Assignee: | Michael Weber (RETIRED) <xmw> |
Status: | RESOLVED UPSTREAM | ||
Severity: | normal | Keywords: | PATCH |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | Patch to remove extra newline at end of copied text |
Description
Horst Prote
2012-02-12 02:41:41 UTC
Created attachment 301699 [details, diff]
Patch to remove extra newline at end of copied text
Here a patch that works for me.
Ahh, forgot to say that I did not test this on windows. Can you please report this upstream? http://mupdf.com/ My suggested snipplet (w/o looking at the rest of the code). + // remove the last newline of the copied text +#ifdef _WIN32 + if (p >= 2 && ucsbuf[p-2]=='\r' && ucsbuf[p-1]=='\n') + { + ucsbuf[p-2] = 0; + } +#else + if (p >= 1 && ucsbuf[p-1]=='\n') + { + ucsbuf[p-1] = 0; + } +#endif (In reply to comment #3) > Can you please report this upstream? http://mupdf.com/ http://bugs.ghostscript.com/show_bug.cgi?id=692866 Upstream patched this in a git commit: http://git.ghostscript.com/?p=mupdf.git;a=commit;h=22bbb6e6d3bcd01b164e91ecf500dc9d7305269e |