Open lersek opened 9 months ago
The problem is not really, that insert fails, but some internal X11 error occurs when rendering this character, which kills the X session. It is possible that this is an libxft or an Xorg bug, but I have to look into this further.
This is with xnedit built at commit b1c382a ("mark iconified windows in the window menu").
When inserting a unicode character outside of the basic multilingual plane, for example the U+1F9AD Seal "ðŸ¦" character, xnedit exits with code 1, and with the following message written to stderr:
This happens if the Seal character is inserted via clipboard (Edit | Paste, Ctrl+V), or via Edit | Insert Unicode (Alt+Ctrl+U).
Note that my only reproducer thus far is only this particular Seal character, so when I say "code point outside of the BMP", I'm already generalizing -- which may be incorrect. It's just my assumption that xnedit limits itself to the BMP at this time. (Which is fine, but then the behavior upon insert should be more graceful.)
In order to avoid data loss, I suggest that such errors are handled explciitly -- either ignore the failed insert operation, or pop up an error message. Just don't crash :)
Thanks.