Attachments
ws-246.patch
Replace non-breaking spaces with spaces when copying from source view
Votes
For: 0 (0%)
Against: 0 (0%)
Total: 0
June 1, 2015 11:21 AM
David Gasperoni
Version 1.5 (104.0)
OS X 10.10.3, stock Apache/2.4.10, PHP 5.6.9 (brew) with Xdebug v2.3.2 (brew).
See this, video 2: https://www.dropbox.com/sh/unima1ankadniet/AABGwZ57liltjE-QPPfTE1nAa?lst
The whitespace in the code view is C2A0, which means that code copied from that view is not usable for anything.
OS X 10.10.3, stock Apache/2.4.10, PHP 5.6.9 (brew) with Xdebug v2.3.2 (brew).
See this, video 2: https://www.dropbox.com/sh/unima1ankadniet/AABGwZ57liltjE-QPPfTE1nAa?lst
The whitespace in the code view is C2A0, which means that code copied from that view is not usable for anything.
December 14, 2018 10:58 PM
outis
The video link in the original description is dead, so I can't tell with certainty what the original issue was, but the summary suggests it's that text copied from the code view contains non breaking whitespace, so when pasted into something else, it won't run as PHP code.
The cause for that issue is `php -s` (which is used to generate the rich text in the code view) replaces all spaces and tabs with non-breaking spaces in its HTML-ized output.
One quick solution would be to perform a reverse replacement when the text is copied from the source view. I'll attach a patch to illustrate.
The cause for that issue is `php -s` (which is used to generate the rich text in the code view) replaces all spaces and tabs with non-breaking spaces in its HTML-ized output.
One quick solution would be to perform a reverse replacement when the text is copied from the source view. I'll attach a patch to illustrate.
December 14, 2018 11:04 PM
outis
To undo `php -s`'s space & tab to nbsp conversion, replaces nbsps with spaces for the plain text on the pasteboard after copying from BSSourceViewTextView (leaves the rich-text on the pasteboard as-is).
On September 4, 2019 02:40 PM, Robert changed:
- Status from "Unconfirmed" to "Closed"
- Resolution from "Open" to "Fixed"
- Fixed in Revision from "" to "4df899045a69f7f6e1134a3d7a761d201ff33c20"
September 4, 2019 02:40 PM
Robert
Fixed for 2.0.
September 4, 2019 02:41 PM
Robert
Note though I took a different approach than the proposed patch: I replace the non-breaking spaces in the source view, rather than only on copy.