Hello, guest. We have noticed that you are not registered at this bug tracker. Your experience will be greatly enhanced if you log in. To do so, you first must register by clicking on the Register tab at the top. If you are already registered, you can login at the Login tab.
Syndicate Syndicate Listing Display Search Login/Register
Bug Id ?
Reporter ?
David Gasperoni
Product/Version ?
MacGDBp / 1.5
Status ?
Unconfirmed
Severity ?
Moderate
Duplicate Of ?
- none -
Fixed in Revision ?
Mstone ?
Summary ?
Using non breaking whitespace in code view cause annoying side effects
Report Time ?
June 1, 2015 11:21 AM
Assignment ?
Resolution ?
Open
Priority ?
Normal
Dependencies ?
- none -
Mstone (old) ?


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.

December 14, 2018 09: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.

December 14, 2018 10: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).