Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] how to add a 'None breaking space'? chr 160 while editing and don't remove them on save #738

Open
obw opened this issue Feb 12, 2020 · 4 comments
Labels

Comments

@obw
Copy link
Contributor

obw commented Feb 12, 2020

The normal way would be:
ctrl+space or ctrl+shift+space
But both combinations do nothing.

@worstje
Copy link
Contributor

worstje commented Feb 15, 2020

I don't think a shortcut for it exists. Assuming the default Qt control works as expected, you can probably find a method to enter it that works in this table.

@obw
Copy link
Contributor Author

obw commented Feb 15, 2020

So now this is a Bug...

  1. I found no way to enter this char!
  2. When I edit a file, with an other Editor and add there the non-breaking-space, Manuskript replace it, with a normal space (chr 32).

@worstje thanks for your effort.

P.S. I used VIM to validate this..
P.P.S.: I closed Manuskript, edit a textfile of a Project, open Manuskript, edit the File again- After this the the NBSP where gone:(

@obw obw changed the title [Question] how to add a 'None breaking space'? chr 160 while editing. [BUG] how to add a 'None breaking space'? chr 160 while editing and don't remove them on save Feb 15, 2020
@worstje
Copy link
Contributor

worstje commented Jul 10, 2021

Going through some old issues to see what is relevant and what isn't... this one is still relevant even though recent versions of Qt are a lot more unicode/emoji friendly that resolves some related issues.

@worstje
Copy link
Contributor

worstje commented Jul 10, 2021

A partial fix for this was implemented in my local branch of assorted fixes which I'll prepare a PR for at the end of this weekend.

Unfortunately Qt has a completely idiotic decision to just replace non-breaking spaces with spaces in one of their core classes. The closest thing I see to properly fixing it for our users (due to the weirdness of PyQt) is to reimplement all of the copy-paste functionality myself, which is not remotely in the scope of the little fixes I wanted to do this weekend. (I spent too much time on this as it is!)

So my fix will leave copy-paste broken (making it hard to verify the non-breaking space is not getting butchered), but internally, the non-breaking spaces will remain intact after you enter them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants